Apply changes to infrastructure
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing HashiCorp Certified: Terraform Associate premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- How apply enacts a plan
- Skipping the prompt: -auto-approve and saved plans
- State refresh and write-back during apply
- Exam-pattern recognition
Three ways to apply changes
| Aspect | Plain apply | apply -auto-approve | apply <saved-plan-file> |
|---|---|---|---|
| Generates a new plan first? | Yes, as if you ran terraform plan | Yes, then applies it immediately | No, it executes the actions already saved in the file |
| Prompts for approval? | Yes, you type yes to proceed | No, the prompt is skipped | No, passing the file is the approval |
| Effect of -auto-approve | Skips the prompt | This is that mode | Ignored; a saved plan never prompts |
| Refreshes state by default? | Yes, unless -refresh=false | Yes, unless -refresh=false | No, it executes the actions recorded when the plan was saved |
| Typical use | Hands-on change with a review | Automated pipeline with no human | Apply the exact plan that was reviewed |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.