Infrastructure as Code

Plan, Apply, and Destroy

Use the OpenTofu plan, apply, and destroy workflow to separate preview from mutation, approve exact actions, and protect resource scope during removal.

Intermediate14 min read
Infrastructure as Code lessonDelivery and reliability foundationsPractice

UNTIMED COACHING

Practice before the pressure

Use feedback to correct the model, not merely memorize an option position.

GUIDED PRACTICE

Practice the lesson questions

Answer normal lesson questions without a timer. Every answer includes an explanation, and incorrect answers can be tried again before continuing.

CONCEPT MODELS

See the lesson as a system

Use these visual guides to connect the key ideas before answering the questions.

Connect the roles in Plan, Apply, and DestroyKeep configuration intent, state context, plan review, and apply execution as separate service roles.
Connect the roles in Plan, Apply, and DestroyA topic-specific model connects four distinct roles used to reason about plan, apply, and destroy.
Configuration filesFiles declare one test server change
State dataData maps configuration to managed objects
Output evidenceEvidence previews proposed resource actions
Apply processProcess performs approved resource actions
Verify Destroy boundaryConnect destroy boundary with its topic-specific inspection, expected outcome, and protected delivery boundary.
Verify Destroy boundaryA verification model for plan, apply, and destroy connects the final service decision to its check, result, and protected boundary.
Removal decisionDecision limits deletion to owned test resources
Starting checkInspect removal decision
Expected resultConfirm removal decision
Safety boundaryProtect configuration files scope