Skip to content

Terraform Configuration Questions

Practice questions for Terraform Configuration topic in HashiCorp Certified: Terraform Associate (004). 40 questions covering this domain.

40 questions8 easy20 medium12 hard
Q1
hard

An external policy engine modifies a managed resource tag after every apply, and the team does not want Terraform to keep planning that tag change. Wh...

Q2
hard

A team wants to validate an infrastructure behavior at the end of plan or apply, but a failure should only warn and not block the run. Which Terraform...

Q3
medium

A resource already exists outside the current configuration, and the team only needs to read its attributes for use elsewhere. Which block should they...

Q4
hard

Resource B references an attribute from Resource A in its arguments. What kind of dependency does Terraform usually infer from that reference?

Q5
medium

A configuration needs to combine two maps into one map value. Which built-in function should be used?

Q6
hard

A provider supports a password_wo argument and matching password_wo_version. What is the benefit of using that write-only argument?

Q7
medium

What does setting sensitive = true on a Terraform variable do?

Q8
medium

A root module calls a child module and wants to use a value produced inside that child. What must be true first?

Q9
medium

A practitioner wants to set a Terraform input variable named region through the shell environment. Which environment variable name should they use?

Q10
hard

A team must replace a resource but avoid downtime by creating the replacement before deleting the original. Which lifecycle rule should they use?

Q11
medium

You want to reject an invalid assumption before Terraform tries to create a resource. Which validation mechanism best fits?

Q12
easy

What is the role of a Terraform data source?

Q13
easy

A root module declares a variable without a default value and no other value is assigned. What happens before Terraform can generate a plan?

Q14
hard

Which expression is valid in replace_triggered_by?

Q15
medium

An output is marked sensitive = true. Which statement is correct?

Q16
hard

A data block argument depends on a resource attribute that will be known only after apply. What should you expect during planning?

Q17
hard

What is the documented effect of a failed postcondition?

Q18
medium

How does Terraform handle values assigned to an undeclared root module variable?

Q19
medium

When should you add depends_on explicitly?

Q20
medium

A root module variable receives different values from an auto.tfvars file, an environment variable prefixed with TF_VAR_, and a -var flag. Which sourc...

Sign in to see all 40 questions

Create a free account to browse all questions — completely free during our launch phase.