Open the app

Free HashiCorp Terraform Associate 004 practice questions

10 free sample questions for the HashiCorp Terraform Associate 004 exam, each with an explanation that starts with why a wrong answer is wrong. No account needed. Try the first one now.

Terraform Associate sample10 free questions
A module uses language features introduced in Terraform 1.9. The team wants Terraform to refuse to run this configuration with an older CLI. Which setting does this?

Why that one is wrong. A comment is documentation only, and Terraform ignores it.

Why that one is wrong. This depends on every run going through CI, and Terraform itself would not refuse to run locally.

Why that one is wrong. A provider constraint controls provider versions and has no effect on which Terraform CLI versions may run.

Why D is right. When the CLI version does not satisfy required_version, Terraform stops with an error before doing any work.

The required_version setting in the terraform block makes Terraform refuse to run when the CLI version does not satisfy the constraint.

What the exam covers

  • Infrastructure as Code (IaC) with Terraform (12.5%)
  • Terraform fundamentals (12.5%)
  • Core Terraform workflow (12.5%)
  • Terraform configuration (12.5%)
  • Terraform modules (12.5%)
  • Terraform state management (12.5%)
  • Maintain infrastructure with Terraform (12.5%)
  • HCP Terraform (12.5%)

A few more sample questions

Sample question 1. A team manages its cloud networks by clicking through vendor consoles. Changes are hard to review before they happen, and the staging network never quite matches production. Which benefits would the team gain by defining this infrastructure in Terraform configuration? (Choose two.)

  1. Changes can be proposed and reviewed as code in version control before being applied
  2. One configuration can create consistent environments such as staging and production
  3. Provider credentials are no longer needed to create or change the cloud resources
  4. The infrastructure can never drift from the configuration once it has been applied
  5. Engineers no longer need to understand the cloud services they are configuring

Sample question 2. A team uses Terraform CLI workspaces named dev and prod with one configuration and one S3 backend. Which two statements are accurate? (Choose two.)

  1. Each workspace keeps its own state for the same configuration
  2. Workspaces isolate credentials, so dev engineers cannot read prod state
  3. All workspaces use the same configuration code and the same backend settings
  4. Creating a workspace copies the configuration so edits to dev never affect prod
  5. The default workspace can be deleted once other workspaces exist

Sample question 3. A networking team manages a shared VPC in its own Terraform configuration. An application configuration must place instances in that VPC’s subnets, looking up their IDs by tag each time it plans, without managing or changing the subnets. Which construct should the application configuration use?

  1. A data block, such as data "aws_subnets", filtered on the tag
  2. A resource block for the subnets using the same tags as the existing ones
  3. An import block for each subnet so that the configuration can read its attributes
  4. A locals block holding subnet IDs that were copied from the console

Answer them with explanations

Terraform Associate is free practice for now

Answer the free sample questions above, as many times as you like. Timed practice tests for Terraform Associate are not on sale yet.

How to trust this practice

  • Every answer explains why, and cites its source.
  • Practice tests are built around the vendor’s published exam domains.
  • These are practice questions, not real exam questions.

See the free sample questions for every certification

Take it with you

  • Download on the App Store
  • Get it on Google Play