nerdexam
HashiCorpHashiCorp

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.

Read, generate, and modify configuration

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_version in the terraform block 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

#Terraform versions#HCL syntax#Configuration compatibility#Terraform 0.12

Community Discussion

No community discussion yet for this question.

Full TA-002-P PracticeBrowse All TA-002-P Questions