To avoid unexpected changes and breaking updates, we must pin the versions of our Terraform providers and any modules we use. This ensures that our terraform init and terraform apply commands are deterministic and repeatable. We should define specific version constraints in our required_providers block and module blocks.
Acceptance Criteria:
The required_providers block in versions.tf is updated to use exact version constraints (e.g., version = "~> 6.16.0").
If external modules are used, their source attributes are updated to pin to a specific version tag or commit hash.
A terraform lock command is run to generate a .terraform.lock.hcl file, which is then committed to the repository.
To avoid unexpected changes and breaking updates, we must pin the versions of our Terraform providers and any modules we use. This ensures that our
terraform initandterraform applycommands are deterministic and repeatable. We should define specific version constraints in our required_providers block and module blocks.Acceptance Criteria:
The required_providers block in versions.tf is updated to use exact version constraints (e.g., version = "~> 6.16.0").
If external modules are used, their source attributes are updated to pin to a specific version tag or commit hash.
A terraform lock command is run to generate a .terraform.lock.hcl file, which is then committed to the repository.