Courseiva

TF-004 · topic practice

Use the core Terraform workflow practice questions

Practise HashiCorp Terraform Associate TF-004 Use the core Terraform workflow practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Reviewed byJohnson Ajibi· MSc IT Security
20 questionsDomain: Use the core Terraform workflow

What the exam tests

What to know about Use the core Terraform workflow

Use the core Terraform workflow questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common Use the core Terraform workflow exam traps

  • Answering from memory before reading the full scenario.
  • Missing a constraint such as cost, availability, security, scope or command context.
  • Choosing a broad answer when the question asks for the most specific fix.
  • Ignoring why the wrong options are tempting.

Practice set

Use the core Terraform workflow questions

20 questions · select your answer, then reveal the explanation

During a 'terraform plan', you see the following output: 'Plan: 1 to add, 2 to change, 0 to destroy.' However, after running 'terraform apply', the actual number of resources changed is different. What is the most likely reason?

Which TWO of the following are valid steps in the core Terraform workflow?

A team is adopting Terraform for infrastructure deployment. They want to ensure that the core workflow (write, plan, apply) is followed effectively. Which two practices should they adopt? (Choose two.)

What is the most likely cause of this error?

Exhibit

Refer to the exhibit.

```hcl
resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"
}
```

An engineer runs `terraform apply` with this configuration and receives the following error:

```
Error: Error launching source instance: UnauthorizedOperation: You are not authorized to perform this operation.
```

Drag and drop the steps to import existing infrastructure into Terraform state in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

Match each Terraform workflow stage to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Author infrastructure as code configuration

Preview changes before applying

Execute the planned changes

Tear down managed infrastructure

Restructure configuration without changing external resources

Which THREE are valid methods to manage Terraform state files? (Choose three.)

When running `terraform plan`, an engineer sees that Terraform proposes to destroy an existing resource even though the resource still exists in the cloud provider. What is the most likely cause?

An engineer accidentally destroys a critical resource by running `terraform apply` after an incorrect `terraform plan`. They want to recover the resource quickly. What should they do?

Which TWO statements accurately describe the `terraform plan` command? (Select TWO.)

Which THREE are valid uses of the `terraform state` command? (Select THREE.)

During terraform init, which TWO of the following actions occur? (Choose two.)

Which THREE of the following are valid flags for the terraform apply command? (Choose three.)

A team is running terraform in a CI/CD pipeline that executes multiple jobs in parallel for different modules. They notice that terraform init takes a long time in each job because it downloads provider plugins repeatedly. They want to speed up the init process by caching providers. What should they do?

A team uses Terraform to manage infrastructure. After running 'terraform apply', a developer notices that a new security group rule was added, but then immediately removed. What is the most likely cause?

A DevOps engineer is troubleshooting a failed 'terraform apply'. The error message says: 'Error: Error applying IAM policy: The policy failed validation'. The IAM policy is defined using HCL in a JSON-encoded string. What is the most efficient way to debug this issue?

A team wants to ensure that all Terraform runs are recorded for audit purposes. Which practice should they implement?

Which TWO actions are part of the core Terraform workflow? (Choose two.)

Which THREE of the following are valid reasons to use 'terraform refresh'? (Choose three.)

You are a DevOps engineer at a large e-commerce company. The infrastructure team uses Terraform to manage AWS resources across multiple accounts. Recently, they introduced a new module that creates an S3 bucket with a bucket policy. The module is used in several environments (dev, staging, prod). After merging a pull request that updates the bucket policy to grant cross-account access to a new partner account, the 'terraform apply' in the dev environment fails with: 'Error: Error putting S3 policy: AccessDenied: Access Denied'. The team is using a remote backend (S3) with DynamoDB locking. The CI/CD pipeline runs as an IAM role with permissions to manage infrastructure. The module uses 'aws_iam_policy_document' data source to construct the policy. The error occurs only in dev, not staging or prod. What is the most likely cause and the correct course of action?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Use the core Terraform workflow sessions

Start a Use the core Terraform workflow only practice session

Every question in these sessions is drawn from the Use the core Terraform workflow domain — nothing else.

Related practice questions

Related TF-004 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the TF-004 exam test about Use the core Terraform workflow?
Use the core Terraform workflow questions test whether you can apply the concept in context, not just recognise a definition.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Use the core Terraform workflow questions in a focused session?
Yes — the session launcher on this page draws every question from the Use the core Terraform workflow domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other TF-004 topics?
Use the topic links above to move to related areas, or go back to the TF-004 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the TF-004 exam covers. They are not copied from any real exam or dump site.