Skip to main content

Terraform-Associate-004 HashiCorp Certified: Terraform Associate (004) (HCTA0-004)

  • HashiCorp
  • 5 free sample questions

About this exam

Terraform-Associate-004 is the HashiCorp exam HashiCorp Certified: Terraform Associate (004) (HCTA0-004). Paid practice material for this exam is not available yet, but you can try its free sample questions.

Exam code
Terraform-Associate-004
Vendor
HashiCorp
Practice questions
Not available yet
Free sample questions
5
Question bank last updated
Not available yet

Try 2 sample questions

Taken from the free sample set for Terraform-Associate-004.

Question 1

Your team uses HCP Terraform to manage infrastructure. You need to make a change to an infrastructure stack running in a public cloud.

Which pattern follows Infrastructure as Code best practices for making the change?

  1. Option A:

    Clone the repository containing your infrastructure code, and then run the code.

  2. Option B:

    Use the public cloud console to make the change.

  3. Option C:

    Make the change through the public cloud API endpoint.

  4. Option D:

    Run the public cloud CLI tool to make the change

  5. Option E:

    Submit a pull request and wait for an approved merge of the change.

Show answer and explanation

Correct answer: E

Detailed Explanation:

Rationale for Correct Answer: Infrastructure as Code best practice is to make infrastructure changes through version-controlled configuration. With HCP Terraform, a common and recommended workflow is to modify Terraform code in a branch, submit a pull request, review and approve the change, merge it, and let HCP Terraform execute the run based on that VCS-driven workflow. This preserves review history, auditability, collaboration, and consistency.

Analysis of Incorrect Options (Distractors):

A. Clone the repository containing your infrastructure code, and then run the code. Incorrect. Running locally can bypass centralized HCP Terraform workflow controls, policy checks, approvals, and audit trails.

B. Use the public cloud console to make the change. Incorrect. Console changes create configuration drift and bypass Terraform state and version control.

C. Make the change through the public cloud API endpoint. Incorrect. Direct API changes bypass Terraform and can cause drift.

D. Run the public cloud CLI tool to make the change. Incorrect. Cloud CLI changes are imperative changes outside Terraform’s managed workflow.

Key Concept: Infrastructure changes should be made through version-controlled Terraform configuration and reviewed before being applied.

[Reference: Terraform Objective Domain: Understand Infrastructure as Code (IaC) Concepts,

Question 2

Which of these is true about Terraform ' s plugin-based architecture?

  1. Option A:

    Terraform can only source providers from the internet

  2. Option B:

    Every provider in a configuration has its own state file for its resources

  3. Option C:

    You can create a provider for your API if none exists

  4. Option D:

    All providers are part of the Terraform core binary

Show answer and explanation

Correct answer: C

Terraform is built on a plugin-based architecture, enabling developers to extend Terraform by writing new plugins or compiling modified versions of existing plugins1.

Terraform plugins are executable binaries written in Go that expose an implementation for a specific service, such as a cloud resource, SaaS platform, or API2. If there is

no existing provider for your API, you can create one using the Terraform Plugin SDK3 or the Terraform Plugin Framework4. References =

•1: Plugin Development - How Terraform Works With Plugins | Terraform | HashiCorp Developer

•2: Lab: Terraform Plug-in Based Architecture - GitHub

•3: Terraform Plugin SDK - Terraform by HashiCorp

•4: HashiCorp Terraform Plugin Framework Now Generally Available

See all 5 free sample questions