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.
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
- List the OS/arch combinations your CI runs on.
- Run
tofu providers lockwith a-platformflag for each. - Commit the enriched
.terraform.lock.hcl.
tofu providers lock \
-platform=linux_amd64 \
-platform=linux_arm64 \
-platform=darwin_arm64Run 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.