required_version
The setting in the terraform block that says which Terraform versions may run this configuration.
In more detail
If the installed Terraform is outside the range, every command refuses to run instead of failing halfway in a confusing way. It uses the same constraint syntax as provider versions. The course pins at least 1.6.0 because the test framework needs it.
Example
required_version = ">= 1.6.0"Related terms
- terraform block — The top-level block that configures Terraform itself rather than any infrastructure, such as its required version, providers and backend.
- version constraint — A string such as "~> 3.6" or ">= 1.6.0" that says which versions of Terraform, a provider or a module are acceptable.
- terraform version — The command that prints the Terraform version, the platform it was built for and the version of every installed provider.
Taught in
- Installing Terraform And Meeting The CLI — Infrastructure as Code with Terraform
- Providers And The required_providers Block — Infrastructure as Code with Terraform
- One Hour, No Weights Published — HashiCorp Terraform Associate (004) Exam Prep
- Providers: How Terraform Reaches Every API — HashiCorp Terraform Associate (004) Exam Prep