nerdexam
HashiCorpHashiCorp

TERRAFORM-ASSOCIATE-004 · Question #243

TERRAFORM-ASSOCIATE-004 Question #243: Real Exam Question with Answer & Explanation

The correct answer is B: version = "3.1". In the required_providers block, provider version constraints follow standard HCL attribute syntax: an attribute name, an equals sign, and a quoted string value - for example, version = "3.1". A bare version keyword without a value (A), a colon separator like version: 3.1 (C), an

Submitted by naveen.iyer· Apr 18, 2026Understand Terraform Providers

Question

Which of the following should you add in the required_providers block to define a provider version constraint?

Options

  • Aversion
  • Bversion = "3.1"
  • Cversion: 3.1
  • Dversion - 3.1

Explanation

In the required_providers block, provider version constraints follow standard HCL attribute syntax: an attribute name, an equals sign, and a quoted string value - for example, version = "3.1". A bare version keyword without a value (A), a colon separator like version: 3.1 (C), and a dash separator like version - 3.1 (D) are all invalid HCL syntax and will cause a parsing error when Terraform initializes.

Topics

#provider version constraint#required_providers block#HCL syntax#provider configuration

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 PracticeBrowse All TERRAFORM-ASSOCIATE-004 Questions