Skip to content
Latchkey

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.

terraform output
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.

.github/workflows/ci.yml
- uses: hashicorp/setup-terraform@v3
  with:
    terraform_version: 1.8.5
- run: terraform version

Align the constraint and the installed version

  1. Read the constraint and installed version from the error.
  2. Either bump the CI Terraform version into range, or relax required_version if the older version is acceptable.
  3. Keep the pinned CI version and required_version in sync going forward.

How to prevent it

  • Pin terraform_version in setup-terraform to match required_version.
  • Update CI and required_version together.
  • Assert the version early with a terraform version step.

Related guides

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