Terraform Fundamentals
Drill 18 practice questions focused entirely on Terraform Fundamentals for the HashiCorp Terraform Associate exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.
A platform team already uses Terraform to provision AWS infrastructure. They now want to manage GitHub repository settings, Datadog monitors, and Cloudflare DNS records using the same tool and workflow, without writing custom API scripts. Which characteristic of Terraform's provider ecosystem makes this possible?
Your team writes Terraform configuration that provisions resources in a SaaS monitoring platform. The platform exposes a REST API, but your engineers only write HCL resource blocks and never call the API directly. Which component is responsible for translating your declarative resource definitions into the specific API calls that create and manage those resources?
Your team maintains Terraform configurations that provision resources across AWS. During a recent CI run, a teammate's apply produced a slightly different plan than yours, even though the configuration and state were identical. You discover that each machine downloaded a different version of the AWS provider from the Terraform Registry. Which practice would most directly prevent this inconsistency?
A teammate uses your cloud provider's web console to manually resize a virtual machine that was originally created by Terraform. No one updated the Terraform configuration. During the next 'terraform plan', what allows Terraform to detect that the live infrastructure no longer matches its records?
A platform team manages a large Terraform configuration with hundreds of resources spanning several cloud services. During each `terraform plan`, engineers notice that Terraform does not query every provider API from scratch to rebuild the full picture of what exists; instead it uses recorded resource metadata and can process independent resources concurrently. Which benefit of Terraform state is primarily responsible for this behavior?
A DevOps engineer notices that when they run 'terraform plan' after provisioning infrastructure, Terraform correctly reports 'No changes' even though the configuration files contain resources that already exist in AWS. A new team member asks how Terraform knows which real-world AWS resources correspond to the resources declared in the configuration without re-querying and re-creating everything. What is the correct explanation?
A new engineer joins your team and argues that Terraform doesn't really need a state file because it could just query each cloud provider's API directly to determine what infrastructure exists before every plan. Which statement best explains why Terraform relies on a state file rather than treating the live cloud API as its sole source of truth?
A DevOps engineer manually changed the instance type of an EC2 server through the AWS console after it was originally created by Terraform. During the next 'terraform plan', the engineer notices that Terraform reports the instance type as different from what is in the configuration and proposes to change it back. Which mechanism allows Terraform to know the current real-world attribute of the instance before generating the plan?
Your team deploys a VPC, subnets, and EC2 instances in a single Terraform configuration. You did not write any explicit 'depends_on' statements, yet Terraform consistently creates the VPC before the subnets and the subnets before the instances. During a later 'terraform destroy', the resources are removed in the reverse order. Which mechanism, informed by the state file, explains this ordering behavior?
A DevOps engineer runs 'terraform apply' to provision an AWS RDS database. Afterward, a teammate asks how Terraform will know the database's current endpoint, allocated storage, and generated password on the next run without querying every attribute from AWS again. What is the primary mechanism Terraform uses to retain this information between runs?
A growing platform team has three engineers who each run Terraform from their own laptops against the same production AWS environment. They keep experiencing conflicting changes, resources being unexpectedly destroyed, and a plan that doesn't match reality. Which characteristic of Terraform state is the root cause they must address to fix this?
A DevOps engineer provisioned a set of AWS resources using Terraform months ago. A teammate later manually created several additional S3 buckets in the same AWS account through the console. When the engineer runs 'terraform destroy' against the original configuration, which resources will Terraform tear down?
Your organization currently manages all AWS infrastructure using AWS CloudFormation. Leadership wants to expand into Azure and Google Cloud while using a single provisioning tool across all three providers. An architect proposes migrating to Terraform. Which characteristic of Terraform, compared to CloudFormation, most directly justifies this migration?
A platform engineering team is evaluating Terraform against a proprietary, vendor-locked IaC product. A key requirement is the ability to manage resources across their public cloud, an internal Kubernetes cluster, and a third-party DNS SaaS — while also being able to build custom integrations for an in-house internal API that no existing tool supports. Which characteristic of Terraform best satisfies this requirement?
A platform team currently uses a configuration management tool that connects to already-running servers over SSH to install packages and update files on a schedule. They want to adopt a tool that instead focuses on creating, updating, and destroying the underlying cloud infrastructure itself (VMs, networks, load balancers) based on a desired-state definition. Which characteristic best distinguishes Terraform as the right fit for this new need compared to their existing tool?
A platform engineer is starting a new project that must provision resources on a niche SaaS monitoring platform. She wants to find a well-supported, HashiCorp-verified integration and review its available resources and configuration arguments before writing any code. Which resource should she use to discover and evaluate this integration?
A platform engineer runs 'terraform plan' on a large configuration and notices it completes quickly, showing an accurate diff of what will change without exhaustively querying every attribute of every resource from scratch. A teammate asks how Terraform knows the current configuration-to-resource relationships so efficiently. What is the primary mechanism enabling this behavior?
A platform team currently uses Ansible to install and configure software packages on already-running virtual machines. They are evaluating whether Terraform could replace Ansible for this task. Which statement best describes how Terraform differs from a configuration management tool like Ansible in this context?
More Terraform Associate practice
Keep going with the other HashiCorp Certified: Terraform Associate (004) domains, or take a full timed mock exam.
← Back to Terraform Associate overview