5 Questions to Test Your Infrastructure as Code (IaC) with Terraform Knowledge (TF-TA004)

5 questions, one domain: Infrastructure as Code (IaC) with Terraform from the HashiCorp Terraform Associate (004) (TF-TA004) exam. Pick your answer, then check it against the explanation.

TF-TA004 Infrastructure as Code (IaC) with Terraform: 5 practice questions

HashiCorp Terraform Associate (004) (TF-TA004) · Infrastructure as Code (IaC) with Terraform · 5 questions with answers and explanations

📊 Set profile

Exam: TF-TA004 · 50 questions · 60 minutes
This set: 5 applied · 3 scenario, 1 comparison, 1 concept check
Topics: Terraform, HCP Terraform

Question 1 of 5

A team keeps configuration in Git and wants Terraform runs to execute in a consistent environment with shared state, secure secret handling and role-based access controls. Which HashiCorp offering does the Terraform documentation point to?

AHCP Terraform, a hosted platform that runs Terraform remotely with team workspaces, state storage and permissions
BSentinel, which merges the plan and apply stages into one approval step with shared state for the team
CThe Terraform Registry, which executes plans on behalf of the users who download its public modules and providers
DA provider plugin, which stores the team's secret values and enforces role-based permissions inside the CLI
Show answer

✅ Answer: A

Difficulty: applied · Topic: Terraform, HCP Terraform

Collaboration
Because configuration is a file, it can be committed to version control. For team workflows the overview says HCP Terraform "runs Terraform in a consistent, reliable environment and provides secure access to shared state and secret data, role-based access controls, a private registry for sharing both modules and providers, and more". (Its workspaces, runs and permissions are covered in the HCP Terraform section of the exam.)

Why each option works or fails
• ✓ A. HCP Terraform (correct): it executes runs in a consistent environment and provides shared state, secret data and access controls for teams.
• ✗ B. Sentinel: it evaluates policy rules; it does not merge or replace plan and apply, and it does not store state.
• ✗ C. Registry: it publishes providers and modules for download; it does not execute plans.
• ✗ D. Provider plugin: a provider translates resources into API calls; team access control and state sharing are not its job.

Question 2 of 5

A security team asks why Terraform is described as "service-agnostic" rather than "cloud-agnostic". Which statement is accurate?

AIt replaces each service's own API with a single universal API owned by HashiCorp
BIt manages any API-backed service through a provider, including DNS, monitoring and source hosting
CIt guarantees that any configuration runs unchanged on every service in its provider catalog, with no rewriting
DIt is limited to the services of one vendor so that behavior stays consistent
Show answer

✅ Answer: B

Difficulty: applied · Topic: Terraform

Beyond clouds
Cloud-agnostic suggests only compute and storage on different clouds. Terraform's scope is wider: a single plan can create a Kubernetes cluster, then a Helm release on it, a Datadog monitor for it, and a GitHub repository for its code, because each is just an API behind a provider. The workflow is shared, while each service keeps its own resource types and arguments.

Why each option works or fails
• ✗ A. Universal API: providers call each service's existing API; HashiCorp does not replace it.
• ✓ B. Any API, any service (correct): providers extend the same workflow to DNS, monitoring, source hosting and more, which is why the term is broader than cloud.
• ✗ C. Unchanged on every service: resource definitions are provider-specific and not portable.
• ✗ D. One vendor only: the opposite; the whole model is breadth through providers.

Question 3 of 5

A team replaces its console click-through runbook with files that describe each network, server and DNS record. Which statement best defines what they have adopted?

ADisaster recovery: a standby copy of every resource is kept in a second region so that it can take over
BContinuous monitoring: a tool samples running resources and raises alerts when utilization crosses a threshold
CConfiguration drift: real infrastructure slowly stops matching the original runbook and is hard to rebuild
DInfrastructure as code: infrastructure described in readable files that are versioned, reviewed and applied by a tool
Show answer

✅ Answer: D

Difficulty: applied · Topic: Terraform

What infrastructure as code means
Infrastructure as code (IaC) manages infrastructure through machine-readable definition files instead of manual steps in a console or ticket queue. Terraform's own description is a tool that lets you "define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share".
• The files are the specification: networks, virtual machines, DNS records and SaaS settings are all written down.
• A tool reads the files and performs the API calls that make real infrastructure match them.
• Because the definition is a text file, everything that works for source code (version control, review, reuse) also works for infrastructure.

Why each option works or fails
• ✗ A. Disaster recovery: keeping a standby copy in another region is a resilience design, and says nothing about how infrastructure gets defined.
• ✗ B. Continuous monitoring: monitoring observes running resources and alerts; it does not describe or create them from files.
• ✗ C. Configuration drift: drift is the problem of reality diverging from the recorded definition, which a manual runbook tends to cause; it is not the practice of writing definitions.
• ✓ D. Infrastructure as code (correct): replacing a click-through runbook with versionable definition files that a tool applies is exactly the practice IaC names.

Question 4 of 5

A company wants to manage a Datadog monitor, a GitHub repository and a DNS record with the same tool it uses for virtual machines. Which statement explains why Terraform can do this?

AThe Terraform CLI binary ships with built-in resource types for popular SaaS products, so no extra plugins are needed
BDatadog and GitHub run their services on cloud vendor virtual machines, so Terraform reaches them through the compute API
CAny system with an accessible API can be managed once a provider exists, not just compute, storage and networking
DTerraform scans the accounts it has credentials for and adopts the services it discovers into its state file
Show answer

✅ Answer: C

Difficulty: applied · Topic: Terraform

Not only servers
The Terraform overview says it can manage "low-level components like compute, storage, and networking resources, as well as high-level components like DNS entries and SaaS features". The reason is architectural: the CLI contains no vendor knowledge. All service knowledge lives in providers, and a provider exists for any system with a usable API (Datadog, GitHub, Cloudflare, Splunk and more).

Why each option works or fails
• ✗ A. Built into the binary: the CLI ships without resource types; providers are separate plugins downloaded by terraform init.
• ✗ B. Through the compute API: where a SaaS vendor hosts its service is irrelevant; Terraform talks to the Datadog and GitHub APIs through their own providers, not to a cloud vendor's compute API.
• ✓ C. API plus provider (correct): any system with an accessible API can be managed once a provider exists, so monitors, repositories and DNS records fit the same workflow as VMs.
• ✗ D. Automatic discovery: Terraform manages only what the configuration declares or what is explicitly imported; it does not scan accounts and adopt services on its own.

Question 5 of 5

A company must create identical development, test and production networks and wants to avoid subtle differences between them. Which IaC benefit addresses this?

ARepeatability: one definition with different inputs yields the same structure in every environment
BEncryption at rest: data stored in all three environments is encrypted by default with provider-managed keys
CLatency routing: users are directed to the environment closest to them
DElasticity: the platform automatically adds capacity to each network as load grows
Show answer

✅ Answer: A

Difficulty: applied · Topic: Terraform

Repeatability
A written definition is applied the same way every time. Differences between environments become explicit input values (CIDR ranges, sizes, names) rather than accidental click differences.
• The same files can build development, test and production, with only variable values such as CIDR ranges or instance sizes changing.
• A reviewer can compare environments by comparing inputs instead of auditing consoles one by one.

Why each option works or fails
• ✓ A. Repeatability (correct): one definition plus per-environment variables yields consistent environments and removes manual drift between them.
• ✗ B. Encryption at rest: protection of stored data is a service setting; it does not make three environments identical.
• ✗ C. Latency routing: directing users is a DNS or traffic feature that does not relate to environment consistency.
• ✗ D. Elasticity: scaling with load is a runtime platform capability, not a property of how infrastructure is defined.

🎯 Takeaways

• HCP Terraform adds consistent runs, shared state, secrets and access control for teams.
• Service-agnostic means one workflow over any API-backed service via providers.
• IaC means infrastructure is defined in versionable text files that a tool turns into real resources.
• Terraform's reach is defined by available providers, which can cover any API, SaaS included.
• Repeatable definitions make environments consistent and cheap to create and destroy.

🔗 Related practice sets

• TF-TA004 Study Notes in Questions: Terraform state management
• TF-TA004 Study Notes in Questions: Maintain infrastructure with Terraform
• HashiCorp Terraform Associate (004) (TF-TA004): 5 Practice Questions on HCP Terraform
• All TF-TA004 practice sets
• Every exam on this blog

📚 Keep studying TF-TA004

More TF-TA004 questions: https://hyunhp.github.io/cert-bank/#exam=TF-TA004
Study guide: https://hyunhp.github.io/cert-bank/study.html#exam=TF-TA004

These are original practice questions, not real exam questions, and cert-bank is not affiliated with any certification vendor.

Original practice questions written for this blog, not exam dumps.

Comments