
HashiCorp Certified:Terraform Associate
Domain 5Objective 2
5b Describe Variable Scope Within Modules TERRAFORM-ASSOCIATE-004 Practice Questions (Page 1)
Part of the Terraform modules domain, which makes up ~8% of our current practice bank. HashiCorp does not publish an official question count, but from its 60-minute exam (~25–40 total, ~2–3 in this domain), expect 1–1 from this objective — we provide 26 practice questions to prepare you well beyond it. (estimate)
26questions here
6free pages
5concepts
Questions 1–5
- 1
A module creates an IAM role and defines `output "role_name" { value = aws_iam_role.this.name }`. The root configuration uses `module.iam.role_name` in a policy attachment. A colleague refactors the module to compute the role name via a local value `local.role_name` and updates the output to `value = local.role_name`. What is the impact on the root configuration?
Select an answer first - 2
In Terraform, where can a variable declared inside a module be referenced?
Select an answer first - 3
What is the only way for a calling configuration to access a value computed inside a module?
Select an answer first - 4
A module defines `locals { ami_id = data.aws_ami.ubuntu.id }` and uses it in an EC2 instance resource. The root configuration needs the same AMI ID to create a launch template. What is the correct approach?
Select an answer first - 5
A module defines a local value `tags = { Team = "Platform" }` and uses it in a resource. The root configuration wants to reuse the same `tags` map for a resource it creates directly. What is the correct way to make the module's local value available to the root configuration?
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.