Free Terraform Associate 004 Exam Braindumps
Terraform Associate 004 Questions 116–120 (page: 25)

Updated On: 10-Feb-2026

Which configuration consistency errors does terraform validate report?

  1. Terraform module isn't the latest version
  2. Differences between local and remote state
  3. Declaring a resource identifier more than once
  4. A mix of spaces and tabs in configuration files

Answer(s): C

Explanation:

Terraform validate reports configuration consistency errors, such as declaring a resource identifier more than once. This means that the same resource type and name combination is used for multiple resource blocks, which is not allowed in Terraform. For example, resource "aws_instance" "example" {...} cannot be used more than once in the same configuration. Terraform validate does not report errors related to module versions, state differences, or formatting issues, as these are not relevant for checking the configuration syntax and structure. Reference = [Validate Configuration], [Resource Syntax]



You have used Terraform lo create an ephemeral development environment in the (loud and are now ready to destroy all the Infrastructure described by your Terraform configuration To be safe, you would like to first see all the infrastructure that Terraform will delete.

Which command should you use to show all of the resources that mil be deleted? Choose two correct answers.

  1. Run terraform state rm `
  2. Run terraform show :destroy
  3. Run terraform destroy and it will first output all the resource that will be deleted before prompting for approval
  4. Run terraform plan .destory

Answer(s): C,D

Explanation:

f

To see all the resources that Terraform will delete, you can use either of these two commands:

terraform destroy will show the plan of destruction and ask for your confirmation before proceeding. You can cancel the command if you do not want to destroy the resources.

terraform plan -destroy will show the plan of destruction without asking for confirmation. You can use this command to review the changes before running terraform destroy. Reference = : Destroy Infrastructure : Plan Command: Options



You can configure Terraform to log to a file using the TF_LOG environment variable.

  1. True
  2. False

Answer(s): A

Explanation:

You can configure Terraform to log to a file using the TF_LOG environment variable. This variable can be set to one of the log levels: TRACE, DEBUG, INFO, WARN or ERROR. You can also use the TF_LOG_PATH environment variable to specify a custom log file location. Reference = : Debugging Terraform



When should you run terraform init?

  1. Every time you run terraform apply
  2. Before you start coding a new Terraform project
  3. After you run terraform plan for the time in a new terraform project and before you run terraform apply
  4. After you start coding a new terraform project and before you run terraform plan for the first time.

Answer(s): D

Explanation:

You should run terraform init after you start coding a new Terraform project and before you run terraform plan for the first time. This command will initialize the working directory by downloading the required providers and modules, creating the initial state file, and performing other necessary tasks. Reference = : Initialize a Terraform Project



What value does the Terraform Cloud private registry provide over the public Terraform Module

Registry?

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

Answer(s): B

Explanation:

The Terraform Cloud private registry provides the ability to restrict modules to members of Terraform Cloud or Enterprise organizations. This allows you to share modules within your organization without exposing them to the public. The private registry also supports importing modules from your private VCS repositories. The public Terraform Module Registry, on the other hand, publishes modules from public Git repositories and makes them available to any user of Terraform. Reference = : Private Registry - Terraform Cloud : Terraform Registry - Provider Documentation



Viewing page 25 of 53
Viewing questions 121 - 125 out of 147 questions


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

AI Tutor AI Tutor 👋 I’m here to help!