Terraform "Unsupported Terraform Core version" in CI
The Terraform CLI on the runner is outside the required_version range your configuration declares. Terraform refuses to proceed rather than risk incompatible behavior.
What this error means
Any command fails immediately with "Unsupported Terraform Core version", naming the constraint and the installed version. It appears after a CI image bumps Terraform or after you tighten required_version.
Error: Unsupported Terraform Core version
This configuration does not support Terraform version 1.5.7. To proceed, either
choose another supported Terraform version or update the root module's version
constraint... required_version = ">= 1.7.0"Common causes
Runner Terraform version is too old or too new
The CI image ships a version outside required_version. A >= 1.7.0 constraint on a runner with 1.5.7 fails; an upper bound < 1.9 on a newer image fails too.
required_version recently tightened
Bumping the constraint in config without updating the version pinned in CI leaves the pipeline running an unsupported binary.
How to fix it
Pin the Terraform version in CI
Install the exact version your config requires with the setup action.
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.5
- run: terraform versionAlign the constraint and the installed version
- Read the constraint and installed version from the error.
- Either bump the CI Terraform version into range, or relax
required_versionif the older version is acceptable. - Keep the pinned CI version and
required_versionin sync going forward.
How to prevent it
- Pin
terraform_versioninsetup-terraformto matchrequired_version. - Update CI and
required_versiontogether. - Assert the version early with a
terraform versionstep.