HashiCorp Certified Terraform Associate (003) Practice Questions & Exam Simulator
Validate HCL syntax, state management, `terraform import`, modules, backends, variable precedence, and count vs for_each across 45 scenario questions.
Exam Code: Terraform 003 | Track: Cloud & DevOps | Recommended Course: Cloud Automation with Terraform & AWS/Azure Bootcamp
Official Exam Blueprint & Domain Weights
- Understand Infrastructure as Code (IaC) Concepts: 15%
- Understand Terraform Basics & State Management: 25%
- Use Terraform Modules & Configuration Language: 30%
- Interact with Terraform State & Operations: 30%
Open Sample Practice Questions & Rationales
Question 1 (Terraform Basics & Infrastructure as Code): What is the primary role of the Terraform State file (`terraform.tfstate`), and why should it be stored remotely with state locking enabled?
- A. It maps real-world cloud resources to your HCL configuration; remote storage with DynamoDB/GCS locking prevents concurrent apply races and state corruption by multiple engineers
- B. It compiles HCL code directly into raw machine bytecode binaries for AWS EC2 execution
- C. It stores plaintext root passwords and AWS secret access keys for public download
- D. It replaces git version control entirely for application source code
Verified Answer (A): Terraform state maintains metadata mapping between HCL configurations and provisioned cloud infrastructure. Remote backends (S3 + DynamoDB) prevent simultaneous write collisions via state locking.
Question 2 (Terraform Lifecycle & Execution): An engineer runs `terraform apply` and notices a resource attribute is marked for destruction and recreation (`-/+`) even though the HCL code was unchanged. What command reveals why Terraform calculated this change?
- A. `terraform plan`
- B. `terraform validate`
- C. `terraform fmt`
- D. `terraform graph`
Verified Answer (A): `terraform plan` compares current state against HCL configuration and real-world provider APIs, detailing whether changes will be in-place (`~`), created (`+`), or destroyed/recreated (`-/+`).
Frequently Asked Questions
What are the highest-yield topics on the Terraform Associate (003) exam?
Expect heavy emphasis on state management (`terraform import`, `state rm`, remote backends with locking), module composition, input variable precedence, and the difference between `count` and `for_each`.