TA-002-P · Question #313
TA-002-P Question #313: Real Exam Question with Answer & Explanation
The correct answer is A: Terraform 0.12 introduced substantial changes to the syntax used to write Terraform. The required_version setting in a Terraform configuration is often used to specify a minimum Terraform CLI version due to significant breaking changes introduced in Terraform 0.12.
Question
Why might a user opt to include the following snippet in their configuration file?
Options
- ATerraform 0.12 introduced substantial changes to the syntax used to write Terraform
- BThe user wants to ensure that the application being deployed is a minimum version of
- Cthis ensures that all Terraform providers are above a certain version to match the
- Dversions before Terraform 0.12 were not approved by HashiCorp to be used in production
Explanation
The required_version setting in a Terraform configuration is often used to specify a minimum Terraform CLI version due to significant breaking changes introduced in Terraform 0.12.
Common mistakes.
- B. The snippet typically refers to the Terraform CLI version, not the version of an application being deployed by Terraform.
- C. While providers have versions, the
required_versionin theterraformblock primarily specifies the Terraform CLI version, not directly provider versions. - D. HashiCorp does not generally disapprove older versions for production use; the main reason for version constraints is feature and syntax compatibility.
Concept tested. Terraform required_version and 0.12 syntax changes
Reference. https://developer.hashicorp.com/terraform/language/settings/terraform#version-constraints
Topics
Community Discussion
No community discussion yet for this question.