
HashiCorp Certified:Terraform Associate
Domain 4Objective 5
4e Write Dynamic Configuration Using Expressions and Functions TERRAFORM-ASSOCIATE-004 Practice Questions (Page 1)
Part of the Terraform configuration domain, which makes up ~22% of our current practice bank. HashiCorp does not publish an official question count, but from its 60-minute exam (~25–40 total, ~6–9 in this domain), expect 1–1 from this objective — we provide 10 practice questions to prepare you well beyond it. (estimate)
10questions here
2free pages
6concepts
Questions 1–5
- 1
In a Terraform expression, you want to assign a value of `"prod"` if a variable `env` equals `"production"`, otherwise assign `"dev"`. Which conditional expression is correct?
Select an answer first - 2
What is the primary purpose of a splat expression in Terraform?
Select an answer first - 3
You are writing a Terraform configuration that creates a set of IAM policy documents. For each policy, you need to generate a JSON string that includes the policy name and a list of allowed actions. You want to use a string template with directives to conditionally include a 'Resource' field only when the policy applies to a specific resource. Which Terraform syntax correctly uses a string template with an if directive to conditionally include the Resource field?
Select an answer first - 4
You need to check if a variable `count` is greater than 5 AND a variable `enabled` is true. Which logical operator should you use?
Select an answer first - 5
Which block type is used to iterate over a collection and generate nested blocks within a resource?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by HashiCorp. “TERRAFORM-ASSOCIATE-004” is a trademark of its owner, used for identification only.