Interview Prep/Terraform/CI/CD and Automation

Why pin the Terraform version in CI and how?

BeginnerProductionCI/CD and Automation
Answer

Different CLI versions produce different plans and may write state in a format that older versions cannot read. Pin required_version in code, read the version from .terraform-version in the pipeline and upgrade through a PR that runs plans for every stack to confirm no diffs.

All Terraform questions Roadmap: Terraform in production

More on CI/CD and Automation