Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.1.1. Write, Plan, Apply: The Cycle

💡 First Principle: Each iteration of the loop is small and reversible because every change passes through a previewable plan — so the cost of a mistake is bounded by what you can see before approving it.

The core cycle has three repeating stages, with setup and teardown bracketing them:

In practice: you write or edit configuration, run terraform init once per new working directory (or when providers/backends change), then loop through plan (review what will change) and apply (make it so) as you iterate. When the infrastructure is no longer needed, destroy removes it. Version control wraps the whole loop — configuration changes go through pull requests, and plan output is often posted to the review for approval.

⚠️ Exam Trap: terraform init is not part of every loop iteration — it's needed when you first set up a directory and whenever you add/change providers, modules, or the backend. The exam may present a scenario asking "what must you run after adding a new provider?" — the answer is init.

Reflection Question: Why does posting plan output to a pull request give reviewers more safety than reviewing the configuration text alone?

Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications