HashiCorp Terraform Associate Exam (page: 8)
HashiCorp Certified: Terraform Associate
Updated on: 25-Dec-2025

What value does the Terraform Cloud/Terraform Enterprise private module registry provide over the public Terraform Module Registry?

  1. The ability to share modules with public Terraform users and members of Terraform Enterprise Organizations
  2. The ability to tag modules by version or release
  3. The ability to restrict modules to members of Terraform Cloud or Enterprise organizations
  4. The ability to share modules publicly with any user of Terraform

Answer(s): C

Explanation:

Terraform Registry is an index of modules shared publicly using this protocol. This public registry is the easiest way to get started with Terraform and find modules created by others in the community.


Reference:

https://www.terraform.io/docs/language/modules/sources.html



Which task does terraform init not perform?

  1. Sources all providers present in the configuration and ensures they are downloaded and available locally
  2. Connects to the backend
  3. Sources any modules and copies the configuration locally
  4. Validates all required variables are present

Answer(s): D

Explanation:


Reference:

https://www.terraform.io/docs/cli/commands/init.html



You have declared a variable called var.list which is a list of objects that all have an attribute id.
Which options will produce a list of the IDs? (Choose two.)

  1. { for o in var.list : o => o.id }
  2. var.list[*].id
  3. [ var.list[*].id ]
  4. [ for o in var.list : o.id ]

Answer(s): B,D



Which argument(s) is (are) required when declaring a Terraform variable?

  1. type
  2. default
  3. description
  4. All of the above
  5. None of the above

Answer(s): E

Explanation:

The variable declaration can also include a default argument.


Reference:

https://www.terraform.io/docs/language/values/variables.html



When using a module block to reference a module stored on the public Terraform Module Registry such as:
How do you specify version 1.0.0?

  1. Modules stored on the public Terraform Module Registry do not support versioning
  2. Append ?ref=v1.0.0 argument to the source path
  3. Add version = "1.0.0" attribute to module block
  4. Nothing ג€" modules stored on the public Terraform Module Registry always default to version 1.0.0

Answer(s): C



Viewing Page 8 of 71



Share your comments for HashiCorp Terraform Associate exam with other users:

DN 9/4/2023 11:19:00 PM

question 14 - run terraform import: this is the recommended best practice for bringing manually created or destroyed resources under terraform management. you use terraform import to associate an existing resource with a terraform resource configuration. this ensures that terraform is aware of the resource, and you can subsequently manage it with terraform.
Anonymous


YK 12/11/2023 1:10:00 AM

good one nice
JAPAN


Mn8300 11/9/2023 8:53:00 AM

nice questions
Anonymous