Skip to content
Latchkey

OpenTofu provider "not available for your platform" in CI

OpenTofu could not install a provider because there is no package built for the runner platform, or the committed lock has no checksum for that platform. This bites when CI runs on an OS/arch the lock never recorded.

What this error means

tofu init fails with "Error: Provider ... is not available for the platform linux_arm64" or a checksum error naming an architecture missing from .terraform.lock.hcl.

tofu
Error: Failed to install provider

Error while installing hashicorp/aws v5.60.0: provider
registry.opentofu.org/hashicorp/aws 5.60.0 is not available for
linux_arm64, or the checksum for that platform is missing from the lock file.

Common causes

The lock has no hash for the runner architecture

The lock was generated only for linux_amd64, but CI runs on linux_arm64, so init has no valid checksum for the provider on that platform.

The provider publishes no build for that OS/arch

Some providers simply do not ship a package for a given platform, so no version is installable there.

How to fix it

Add every CI platform to the lock

  1. List the OS/arch combinations your CI runs on.
  2. Run tofu providers lock with a -platform flag for each.
  3. Commit the enriched .terraform.lock.hcl.
Terminal
tofu providers lock \
  -platform=linux_amd64 \
  -platform=linux_arm64 \
  -platform=darwin_arm64

Run CI on a platform the provider supports

If a provider ships no build for an architecture, pin the job to a runner OS/arch the provider actually publishes.

How to prevent it

  • Record all CI platforms with tofu providers lock -platform=....
  • Keep the runner architecture consistent with the lock.
  • Verify provider platform support before switching runner arch.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →