Terraform Associate
Infrastructure as Code, Terraform Workflow, State, Modules & Best Practices
Exam: Terraform Associate (003)
30 + 8 Questions & Verified Answers
HashiCorp Terraform Associate — 30 + 8 Exam
Questions
Covers all exam objectives: IaC Concepts, Terraform Purpose, Basics, State, Modules, Workflow,
Terraform Cloud, and Advanced Features.
Q01. What is Infrastructure as Code (IaC) and what problem does it solve?
A. Writing code that runs on infrastructure
B. A programming language for cloud platforms
C. A billing model for cloud infrastructure
D. Managing infrastructure through machine-readable definition files rather than manual
configuration — providing version control, repeatability, consistency, and the ability to review
infrastructure changes before applying them
Answer: D. Managing infrastructure through definition files — providing version control,
repeatability, consistency, and reviewable changes
Without IaC: manual clicks in a console — inconsistent, undocumented, error-prone, slow.
With IaC: infrastructure is code — reviewed, versioned in Git, tested, and deployed automatically.
Benefits: idempotency (apply same config multiple times = same result), documentation (code IS
the doc), rollback (revert the Git commit).
Tools: Terraform (multi-cloud), AWS CloudFormation (AWS-only), Azure ARM Templates, Google
Cloud Deployment Manager.
Q02. What is Terraform and what makes it different from provider-specific IaC tools?
A. Terraform is an AWS-only tool
B. Terraform is a declarative, cloud-agnostic IaC tool by HashiCorp that supports 3,000+
providers — enabling teams to define, preview, and deploy infrastructure across AWS, Azure,
GCP, and hundreds of other platforms with a single workflow
C. Terraform only supports container deployments
D. Terraform is a configuration management tool like Chef or Puppet
, Answer: B. Declarative, cloud-agnostic IaC tool supporting 3,000+ providers — single
workflow across AWS, Azure, GCP, and more
Declarative: you describe WHAT you want (the end state), not HOW to get there.
Provider-agnostic: same workflow for AWS, Azure, GCP — just change the provider configuration.
Provider ecosystem: AWS, Azure, GCP, Kubernetes, GitHub, Datadog, PagerDuty, Snowflake, and
3,000+ more.
HCL (HashiCorp Configuration Language): Terraform's configuration language — human-readable,
JSON-compatible.
Q03. What is a Terraform provider?
A. The cloud account that runs Terraform
B. A paid HashiCorp service
C. A Terraform module for creating VMs
D. A plugin that implements resource types for a specific API — translating Terraform
configuration into API calls for a specific cloud platform or service (AWS provider, Azure
provider, Google provider, Kubernetes provider)
Answer: D. Plugin implementing resource types for a specific API — translates HCL into API
calls for a cloud or service
Providers are published in the Terraform Registry (registry.terraform.io).
Provider configuration: specify provider credentials and settings in a provider block.
Required providers: declare providers in terraform block with source and version constraints.
Provider versions: pin to specific versions to avoid breaking changes — use >= constraints
carefully.
Q04. What does 'terraform init' do?
A. Initialize a new AWS account
B. Creates the first Terraform plan
C. Applies the Terraform configuration to create resources
D. Downloads the required provider plugins and modules, initializes the backend for state
storage, and prepares the working directory for other Terraform commands
Answer: D. Downloads provider plugins and modules, initializes backend, prepares working
directory
Run 'terraform init' after: creating a new configuration, adding a new provider, or changing backend
configuration.
Downloads: provider binaries to .terraform/providers/, module source code to .terraform/modules/.
Backend initialization: configures where Terraform state is stored (local or remote S3, Azure Blob,
Terraform Cloud).
Safe to run multiple times — idempotent.
Q05. What is the purpose of 'terraform plan'?
A. Create a cost estimate for infrastructure
B. Display a preview of what changes Terraform will make to infrastructure — showing
resources to be added, changed, or destroyed — without making any actual changes
C. Apply changes to production immediately
D. Generate Terraform configuration from existing infrastructure