About the Exam

Terraform Associate (004) is HashiCorp's associate-level certification for cloud engineers with foundational Terraform knowledge and skills. It covers infrastructure as code, Terraform fundamentals, core workflow, configuration, modules, state management, maintenance, and HCP Terraform concepts, and it is tested on Terraform 1.12. Passing demonstrates that you can use Terraform at a foundational level and distinguish Terraform Enterprise or HCP Terraform features from Community Edition.

Exam Topics

  • Infrastructure as Code (IaC) with Terraform12%
  • Terraform fundamentals13%
  • Core Terraform workflow15%
  • Terraform configuration20%
  • Terraform modules8%
  • Terraform state management9%
  • Maintain infrastructure with Terraform8%
  • HCP Terraform15%

How to Use This Practice Exam

  1. Browse — Read each question, select your answer, and reveal the explanation.
  2. Exam Mode — Simulate real exam conditions with a timed session and score report.
  3. Learn Mode — Spaced repetition schedules questions you struggle with for long-term retention.

Download the Full Exam PDF

Get every question and answer in a clean, printable PDF built for offline study. Purchase once, keep permanent access, and re-download the latest version anytime.

Last updated July 23, 2026

Topic filter
Question status
Question sort
Questions per page

QuestionQ1

VerifiedHCP Terraform

Which of the following statements about HCP Terraform workspaces is false?

Explanation

HCP Terraform workspaces can be browsed and selected in the HCP Terraform UI; switching between them does not require the Terraform CLI. HCP Terraform also supports VCS-driven runs, team-based workspace permissions, and securely stored sensitive variables or provider credentials.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ2

VerifiedCore Terraform workflow

You can run terraform fmt to format all Terraform configurations in the current working directory according to Terraform’s canonical format and style.

Explanation

terraform fmt rewrites Terraform configuration files to the canonical Terraform format and style. By default, it scans and formats configuration files in the current directory; subdirectories require the -recursive option.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ3

VerifiedTerraform state management

You have a Terraform configuration that defines one virtual machine, with no references to that VM. You ran terraform apply to create the resource and then removed its resource definition from the Terraform configuration file.

What occurs when you run terraform apply again in the working directory?

Explanation

Terraform treats a managed resource that exists in state but no longer has a corresponding configuration block as a resource to destroy. Applying the resulting plan deletes the virtual machine.

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ4

VerifiedTerraform configuration

Which of the following arguments is required when declaring a Terraform output?

Explanation

A Terraform output block must include a value expression, which Terraform evaluates and exposes as the output value. description and sensitive are optional, and default is not an output-block argument.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!

QuestionQ5

VerifiedTerraform configuration

A data source appears in the Exhibit area of this page.

data "aws_ami" "web" \{  
  most_recent = true  
  owners = ["self"]  
  tags = \{  
    Name = "web-server"  
  \}  
\}  

How do you refer to this data source’s id attribute?

Explanation

Terraform references a data-source attribute with data.<TYPE>.<NAME>.<ATTRIBUTE>. Therefore, the id of the aws_ami data source named web is data.aws_ami.web.id.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!
Know a question that should be here? Contribute to this exam
Back home