HashiCorp · Terraform-Associate
Validates knowledge of infrastructure as code concepts and the ability to use HashiCorp Terraform in production, covering resource lifecycle management, HCL configuration, providers and modules, state management, and collaborative workflows with HCP Terraform.
Practice Questions
628
≈ 11 practice exams
Duration
60 minutes
Passing Score
70%
Difficulty
AssociateLast Updated
Feb 2026
The Terraform Associate exam covers eight areas: infrastructure as code fundamentals, Terraform core concepts (providers and state), the standard workflow (init, plan, apply, destroy, fmt), configuration syntax, module sourcing and versioning, state management and backends, infrastructure maintenance and imports, and HCP Terraform features. HashiCorp does not publish percentage weightings for these areas, so this bank of 628 questions spreads coverage across all eight rather than guessing at an official split.
On test day you get an online-proctored exam with a 1-hour time limit, made up of multiple choice, multiple answer, and true/false questions covering Terraform 1.12. HashiCorp does not publish the exact question count or passing score, so there is no precise target to aim for; treat consistent accuracy across all eight areas as the real goal rather than chasing an unpublished number.
There is no formal prerequisite, though HashiCorp expects basic terminal skills and an understanding of both on-premises and cloud architecture. The exam costs $70.50 and the certification is valid for 2 years, with a recertification window opening 6 months before expiration — renew by retaking the 004 Associate exam or by passing the Terraform Authoring and Operations Professional exam. Start with the free preview, then work through the full 628-question bank until your accuracy holds steady across all eight areas.
The HashiCorp Certified: Terraform Associate (004) validates foundational knowledge of infrastructure as code (IaC) using HashiCorp Terraform Community Edition and HCP Terraform. The certification demonstrates that a candidate understands core Terraform concepts including the resource lifecycle, HCL configuration syntax, provider and module usage, state management, and collaborative workflows. Version 004 of the exam covers Terraform 1.12 and introduces updated objectives around lifecycle rules such as `depends_on` and `create_before_destroy`, custom configuration validation conditions, ephemeral values and write-only arguments for sensitive data handling, and HCP Terraform workspace and project organization.
This certification is widely recognized across the cloud and DevOps industry as a benchmark for Terraform proficiency. It is delivered online via Certiverse, proctored remotely, and is valid for two years from the date of passing. Recertification is available by passing the same exam or a higher-level Terraform exam within six months of expiration. The credential includes a digital badge issued through Credly, suitable for sharing on LinkedIn, resumes, and professional profiles.
The Terraform Associate is designed for cloud engineers, DevOps engineers, and infrastructure practitioners who work with or are transitioning into infrastructure automation roles. Candidates are expected to have foundational Terraform skills—either through professional production experience or hands-on work in a personal or demo environment. The exam is appropriate for those in roles such as Cloud Infrastructure Engineer, DevOps Engineer, Site Reliability Engineer, or Platform Engineer who use Terraform to provision and manage cloud or on-premises resources.
Candidates should have basic terminal proficiency and a working understanding of on-premises and cloud architecture. The exam is not intended for complete beginners to cloud infrastructure but is well-suited for those who have completed introductory Terraform tutorials and want to formalize their knowledge with a vendor-recognized credential.
HashiCorp does not mandate formal prerequisites for the Terraform Associate exam, but recommends that candidates possess basic terminal skills and a general understanding of on-premises and cloud architecture prior to sitting the exam. Familiarity with at least one major cloud provider (AWS, Azure, or GCP) and its core services is beneficial, though provider-specific knowledge is explicitly not tested on the exam itself.
Professional experience using Terraform in production is recommended but not required—HashiCorp acknowledges that performing the exam objectives in a personal or demo environment may be sufficient preparation. Candidates should be comfortable reading and writing HCL configuration files, running Terraform CLI commands, and understanding concepts such as state, providers, modules, and the plan/apply workflow before attempting the exam.
The Terraform Associate (004) is a 60-minute, online-proctored exam delivered through the Certiverse platform. The exam consists of approximately 57–60 questions in multiple-choice format, including true/false, single-select, and multi-select question types. The exam is available only in English. The registration fee is $70.50 USD plus applicable taxes and fees.
HashiCorp uses a scaled scoring model and does not publicly disclose the exact number of scored versus unscored items. The passing score is broadly understood to require approximately 70% mastery across all domains. Candidates receive a pass/fail result immediately upon completion, with detailed objective-level performance feedback delivered within approximately 48 hours. The resulting credential is valid for two years.
Earning the Terraform Associate credential positions engineers competitively for roles that require infrastructure automation expertise, including Cloud Infrastructure Engineer, DevOps Engineer, Platform Engineer, and Site Reliability Engineer. According to HashiCorp, 88% of exam takers agree that passing a HashiCorp Associate-level exam makes job candidates more desirable to employers. Terraform's dominant position in the IaC market — used by organizations across every major industry vertical — means the certification is recognized by a broad range of employers and is frequently listed as a preferred or required qualification in infrastructure-related job postings.
The Terraform Associate complements cloud provider certifications (AWS, Azure, GCP) by validating multi-cloud, provider-agnostic infrastructure skills that those vendor-specific certs do not cover. It is commonly pursued alongside or after an associate-level cloud certification to build a well-rounded infrastructure credential profile. For engineers looking to advance further, HashiCorp offers the Terraform Authoring and Operations Professional certification as a logical next step, validating advanced production-level Terraform expertise.
5 sample questions with answers and explanations. The full bank has 628 questions, enough for 11 full-length practice exams.
Preview — answers shown1. A development team uses Terraform CLI workspaces to manage development, staging, and production environments with identical configurations. Which command creates a new workspace named staging? (Select one!)
Explanation
The terraform workspace new command creates a new workspace and switches to it immediately. CLI workspaces provide named state file variants within the same working directory, allowing multiple environments to share the same configuration while maintaining separate state files. After creation, the current workspace context applies to all subsequent Terraform operations. The terraform workspace list command shows all available workspaces, and terraform workspace select switches between existing workspaces. CLI workspaces differ fundamentally from HCP Terraform workspaces, which are complete infrastructure collections with role-based access control rather than simple state file variants.
2. A development team runs terraform plan -detailed-exitcode in their CI/CD pipeline. The command completes successfully with changes to apply. What exit code does Terraform return? (Select one!)
Explanation
The -detailed-exitcode flag changes Terraform plan to return three distinct exit codes: 0 for success with no changes, 1 for errors, and 2 for success with changes present. This enables CI/CD pipelines to detect whether infrastructure drift exists or updates are needed. Exit code 0 only occurs when no changes are required. Exit code 1 indicates errors or failures. There is no exit code 3 in Terraform.
3. A configuration uses the try function with the expression try(var.config.database.host, "localhost"). The variable var.config exists but does not contain a database attribute. What value does this expression return? (Select one!)
Explanation
The try function evaluates expressions in order and returns the first successful result, or the last value if all others fail. When var.config.database.host fails because the database attribute does not exist, try moves to the second argument and returns localhost. This makes try useful for providing fallback values when navigating potentially incomplete data structures. The function specifically prevents errors from propagating, so Terraform does not error. It returns the specified default value, not null or an empty string.
4. A company uses the pessimistic constraint operator in their required_providers block with version equals ~> 5.2.0 for the AWS provider. Which provider versions will Terraform allow? (Select one!)
Explanation
The pessimistic constraint operator ~> allows only the rightmost version component to increment. With ~> 5.2.0, Terraform accepts 5.2.0, 5.2.1, 5.2.2, and any 5.2.x version, but blocks 5.3.0 and higher. The operator prevents potentially breaking changes in minor version updates while allowing patch updates. This is different from ~> 5.2 which would allow 5.2.x and 5.3.x but block 6.0.0.
5. A Terraform configuration defines an AWS EC2 instance with create_before_destroy = true due to zero-downtime requirements. A security group referenced by this instance does not have create_before_destroy configured. When the security group's CIDR block changes in a way that requires replacement, what behavior will Terraform exhibit? (Select one!)
Explanation
When a resource has create_before_destroy enabled, Terraform automatically propagates this behavior to all dependent resources to prevent dependency graph cycles. The security group is a dependency of the EC2 instance, so it inherits the create_before_destroy behavior regardless of its own lifecycle configuration. This propagation is recorded in state and cannot be overridden to false on dependent resources. Terraform does not error on this situation or follow default destroy-first behavior for dependencies. Resource detachment and independent replacement is not how Terraform handles this dependency relationship.
HashiCorp does not publish an exact count or passing score for this exam.
1 hour, delivered online-proctored.
$70.50 USD, plus applicable local taxes and fees.
Eight areas: infrastructure as code fundamentals, Terraform core concepts, the standard workflow, configuration syntax, module sourcing and versioning, state management and backends, infrastructure maintenance and imports, and HCP Terraform features. HashiCorp does not publish percentage weights for these.
Terraform 1.12, per HashiCorp’s official exam page.
None formal, but HashiCorp expects basic terminal skills and an understanding of both on-premises and cloud architecture.
Yes, after 2 years. Renew by retaking the 004 exam, or by passing the Terraform Authoring and Operations Professional exam. The recertification window opens 6 months before expiration.
Multiple choice, multiple answer, and true/false, per HashiCorp’s own sample-question materials.
$17.99
One-time access to this exam