20+ practice questions focused on Use the core Terraform workflow — one of the most tested topics on the HashiCorp Terraform Associate TF-004 exam. Each question includes a detailed explanation so you learn why the right answer is correct.
Start Use the core Terraform workflow PracticeDuring 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?
Explanation: The plan is generated based on the configuration and state at the time of 'terraform plan'. If the configuration is modified after the plan is generated, 'terraform apply' will use the current configuration, which may differ from what was planned. This can cause the actual number of resources added, changed, or destroyed to differ from the plan. Option C correctly identifies this as the most likely reason. Option A is incorrect because state locking prevents concurrent operations but does not cause a discrepancy if the plan is still valid. Option B is incorrect because a corrupted state file would typically cause errors, not a difference in resource counts. Option D is incorrect as stated. When 'terraform apply' is run without a saved plan file (i.e., 'terraform apply' instead of 'terraform apply <planfile>'), it performs an implicit refresh to detect drift and then generates a new plan based on the current configuration and refreshed state. If drift is detected, this new plan could indeed differ from a previously generated plan. However, modifying the configuration (Option C) is generally a more direct and common reason for a significant discrepancy in resource counts between a 'plan' and a subsequent 'apply'.
Which TWO of the following are valid steps in the core Terraform workflow?
Explanation: `terraform init` is the first step in the core Terraform workflow, which initializes the working directory, downloads the required provider plugins, and sets up the backend configuration. Without this step, subsequent commands like `terraform plan` or `terraform apply` cannot function, as the providers and state backend are not yet configured. `terraform apply` is the final step in the core workflow, executing the changes outlined in the plan to create or update infrastructure to match the desired state defined in the configuration files.
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.)
Explanation: Storing Terraform configurations in a version control system like Git ensures that the 'write' phase is collaborative, auditable, and repeatable. It enables teams to track changes, roll back to previous versions, and enforce code review before applying infrastructure changes, which is a core DevOps practice for the Terraform workflow. Using a remote backend with state locking enabled is crucial for the 'plan' and 'apply' phases in a team environment. It prevents concurrent operations from corrupting the state file, ensures consistency across team members, and provides a centralized, reliable source of truth for the infrastructure's current state.
What is the most likely cause of this error?
Explanation: The provided explanation correctly describes why insufficient permissions would lead to an authorization error (e.g., `ec2:RunInstances` permission missing). However, without the specific error message in the STEM, it's impossible to confirm that the question is indeed about an authorization error. If the error message were, for example, a syntax error or a resource validation error, a different option would be correct. The explanation should directly address the *specific* error presented in the STEM.
Drag and drop the steps to import existing infrastructure into Terraform state in the correct order.
Explanation: First, write the resource configuration block (step 1) to define how Terraform should manage the resource. Then, run `terraform import` (step 2) to bring the existing resource into the Terraform state, linking it to the configuration. Finally, run `terraform plan` (step 3) to verify that the written configuration accurately reflects the imported resource and to detect any drift.
+15 more Use the core Terraform workflow questions available
Practice all Use the core Terraform workflow questions1. Baseline your knowledge
Start with 10 questions to gauge your current understanding of Use the core Terraform workflow. This tells you whether you need a concept refresher or just practice.
2. Review every explanation
For each question — right or wrong — read the full explanation. Understanding why an answer is correct is more valuable than knowing the answer itself.
3. Focus on exam traps
Use the core Terraform workflow questions on the TF-004 frequently use trap wording. Look for subtle differences in answers that test your precision, not just general knowledge.
4. Reach 80% consistently
Do repeated sessions until you score 80%+ three times in a row. Then move to mixed-mode practice to test cross-topic recall under realistic conditions.
The exact number varies per candidate. Use the core Terraform workflow is tested as part of the HashiCorp Terraform Associate TF-004 blueprint. Practicing with targeted Use the core Terraform workflow questions ensures you can handle any format or difficulty that appears.
Yes. Courseiva provides free TF-004 practice questions across all exam topics and domains. The platform includes topic-based practice, mock exams, missed-question review, bookmarked questions, and readiness tracking — no account required.
Difficulty is subjective, but Use the core Terraform workflow is a high-priority exam concept tested in multiple ways — direct recall, scenario analysis, and command-output interpretation. Consistent practice is the best way to build confidence.
Launch a full Use the core Terraform workflow practice session with instant scoring and detailed explanations.
Start Use the core Terraform workflow Practice →