HashiCorp Terraform-Associate-004 Exam
HashiCorp Certified: Terraform Associate (004) (Page 10 )

Updated On: 7-Feb-2026

You can develop a custom provider to manage its resources using Terraform.

  1. True
  2. False

Answer(s): A

Explanation:

You can develop a custom provider to manage its resources using Terraform, as Terraform is an extensible tool that allows you to write your own plugins in Go language. You can also publish your custom provider to the Terraform Registry or use it privately.



What is one disadvantage of using dynamic blocks in Terraform?

  1. Dynamic blocks can construct repeatable nested blocks
  2. Terraform will run more slowly
  3. They cannot be used to loop through a list of values
  4. They make configuration harder to read and understand

Answer(s): D

Explanation:

This is one disadvantage of using dynamic blocks in Terraform, as they can introduce complexity and reduce readability of the configuration. The other options are either advantages or incorrect statements.



Which backend does the Terraform CLI use by default?

  1. Depends on the cloud provider configured
  2. HTTP
  3. Remote
  4. Terraform Cloud
  5. Local

Answer(s): E

Explanation:

This is the backend that the Terraform CLI uses by default, unless you specify a different backend in your configuration. The local backend stores the state file in a local file named terraform.tfstate,

which can be used to track and manage the state of your infrastructure.



How does Terraform manage most dependencies between resources?

  1. Terraform will automatically manage most resource dependencies
  2. Using the depends_on parameter
  3. By defining dependencies as modules and including them in a particular order
  4. The order that resources appear in Terraform configuration indicates dependencies

Answer(s): A

Explanation:

This is how Terraform manages most dependencies between resources, by using the references between them in the configuration files. For example, if resource A depends on resource B, Terraform will create resource B first and then pass its attributes to resource A.



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 correct answers.

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

Answer(s): B,C

Explanation:

These are two ways to produce a list of the IDs from a list of objects that have an attribute id, using either a for expression or a splat expression syntax.






Post your Comments and Discuss HashiCorp Terraform-Associate-004 exam prep with other Community members:

Join the Terraform-Associate-004 Discussion