HashiCorp Certified: Terraform Associate

Here you have the best HashiCorp Terraform Associate practice exam questions

  • You have 347 total questions to study from
  • Each page has 5 questions, making a total of 70 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on May 4, 2025
  • This site is not affiliated with or endorsed by HashiCorp.
Question 1 of 347

The terraform.tfstate file always matches your currently built infrastructure.

    Correct Answer: B

    The terraform.tfstate file does not always match your currently built infrastructure. This is because changes can be made to the infrastructure outside of Terraform, leading to a drift between the actual state and the state recorded in terraform.tfstate. Additionally, the state file represents the last known state from when Terraform was last run. If any changes are made outside of Terraform, they won't be reflected until a refresh or a new plan is run to update the state file.

Question 2 of 347

One remote backend configuration always maps to a single remote workspace.

    Correct Answer: B

    The statement that one remote backend configuration always maps to a single remote workspace is false. A remote backend configuration in Terraform can either map to a single remote workspace or to multiple similarly-named remote workspaces. The configuration can use the 'workspaces.name' to specify a single workspace or the 'workspaces.prefix' to map to multiple remote workspaces with a common prefix.

Question 3 of 347

How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?

    Correct Answer: A

    The Terraform remote backend is unique because it can execute Terraform runs on dedicated infrastructure either on premises or in Terraform Cloud. This feature distinguishes it from other state backends like S3 or Consul, which only store state snapshots but don't have the capability to execute Terraform runs.

Question 4 of 347

What is the workflow for deploying new infrastructure with Terraform?

    Correct Answer: D

    To deploy new infrastructure with Terraform, the standard workflow involves writing a Terraform configuration to define the desired infrastructure. Then, run terraform init to initialize the working directory, which downloads necessary providers and modules. After initialization, terraform plan is executed to create an execution plan, showing what changes will be made to match the configuration. Finally, terraform apply is used to apply the desired changes, thus creating the new infrastructure.

Question 5 of 347

A provider configuration block is required in every Terraform configuration.

Example:

    Correct Answer: B

    A provider configuration block is not required in every Terraform configuration. If the resources in the configuration only use a single provider's resources and do not require any specific configuration for that provider, Terraform can infer the provider and use the default settings. This means that the provider block can be omitted and Terraform will automatically download and use the necessary provider based on the resource types used.