TF-Associate-004 domain - 19% of the exam

Core Terraform workflow

Core Terraform workflow is 19% of the HashiCorp Certified: Terraform Associate (TF-Associate-004) exam. These are the objectives it covers, each with practice questions, with every answer explained.

Objectives in this domain

Sample question from this domain

Free sampleCore Terraform workflowmedium

An engineer runs 'terraform apply' with no extra flags in a directory using the local backend. Terraform prints the proposed plan and then pauses. What must happen before Terraform makes any changes to the real infrastructure?

$ terraform apply
  # aws_instance.web will be created
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
  • ATerraform applies the changes immediately because a plan was already generated during the same command.
  • BThe engineer must re-run the command with 'terraform apply -refresh-only' to confirm the intended changes.
  • CTerraform waits for the engineer to run 'terraform plan' in a second terminal to release the pause.
  • DThe engineer must type 'yes' at the interactive approval prompt before Terraform provisions the resources. Correct
A plain terraform apply presents a plan and requires explicit interactive approval before changing infrastructure. By default terraform apply computes a plan, displays it, and blocks on an interactive confirmation; only after the operator types 'yes' does it call the providers to create, update, or destroy real resources.

Why A is wrong: Tempting because apply does generate its own plan, but without a saved plan file or -auto-approve it still stops and asks for confirmation first.

Why B is wrong: Refresh-only only reconciles state with real infrastructure and proposes no resource changes, so it would never provision the new instance.

Why C is wrong: A separate plan run has no effect on the waiting apply, which is blocked purely on the interactive yes-or-no approval prompt.

Why D is correct: Correct: a bare 'terraform apply' shows the plan and waits for the operator to type 'yes' before it executes any changes.

Other domains in this exam

See also the TF-Associate-004 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by HashiCorp. Original, blueprint-aligned practice material only.