Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
HashiCorp logo

HashiCorp Certified:Terraform Associate

Domain 5Objective 2

5b Describe Variable Scope Within Modules TERRAFORM-ASSOCIATE-004 Practice Questions (Page 4)

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 16–20

  1. 16application · easy

    A module for a database declares `variable "db_name" {}` and uses it in a resource. The root configuration has a variable also named `db_name` set to `customers`. The module block passes `db_name = "orders"`. What value does the module use for `db_name`?

    Select an answer first
  2. 17application · easy

    A team has a module that creates an AWS S3 bucket. The bucket's ARN is computed inside the module as `aws_s3_bucket.this.arn`. The root configuration needs to reference this ARN to attach a bucket policy. What must be added to the module configuration to make the ARN available to the root configuration?

    Select an answer first
  3. 18application · medium

    A platform team maintains a module that provisions an Azure Kubernetes Service cluster. The module declares an input variable named `cluster_name` with no default. Another team calls this module from their root configuration, which also defines a local value named `cluster_name`. The calling configuration's module block does not pass a value for `cluster_name`. What happens when the root configuration is applied?

    Select an answer first
  4. 19expert · medium

    A module declares `variable "subnet_ids" { type = list(string) }`. The root configuration has a local `subnet_ids = ["subnet-1", "subnet-2"]`. The module block passes `subnet_ids = local.subnet_ids`. Inside the module, the variable is used to create resources. Later, the root local is changed to `["subnet-3"]`. What happens on the next plan?

    Select an answer first
  5. 20foundation · easy

    A module creates an Azure resource group. Which block must be added to the module to allow the root module to see the resource group's name?

    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.