
HashiCorp Certified:Terraform Associate
Domain 4Objective 5
4e Write Dynamic Configuration Using Expressions and Functions TERRAFORM-ASSOCIATE-004 Practice Questions (Page 2)
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 6–10
- 6
In a Terraform configuration, you have a variable `instance_count` defined as `variable "instance_count" { type = number }`. Which expression correctly references this variable's value?
Select an answer first - 7
You have a list of strings `subnet_ids` and need to get the first element. Which built-in Terraform function should you use?
Select an answer first - 8
What is the purpose of a `dynamic` block in Terraform?
Select an answer first - 9
A team manages infrastructure for multiple environments (dev, staging, prod) using a single Terraform configuration. Each environment requires a different number of web server instances, and the instance count is stored in a variable named `instance_count`. The team wants to generate a list of unique hostnames for all instances in the format `web-<env>-<index>`, where `<env>` is the environment name stored in a variable named `environment`. Which expression correctly produces this list?
Select an answer first - 10
You have a map `tags` with keys `Name` and `Environment`. Which function retrieves the value for the `Environment` key?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
No more pagesBack to TERRAFORM-ASSOCIATE-004
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.