The Core Terraform Workflow
Terraform work follows a loop of writing, planning and applying. This lesson describes the loop and how it changes from an individual to a team.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the write, plan and apply workflow.
- Explain how the workflow changes from an individual to a team.
Write, plan, apply
HashiCorp describes the core workflow in three steps. In the write step you author configuration, just as you write application code, usually in a version-controlled repository. In the plan step you preview the changes Terraform will make. In the apply step Terraform makes those changes and records them in state.
-
Write
Edit .tf files; run terraform fmt and terraform validate for fast feedback.
-
Plan
Run terraform plan and review the proposed creates, updates and deletes.
-
Apply
Run terraform apply, confirm, and let Terraform make the changes and update state.
Around the loop sit the supporting commands. terraform init prepares the working directory before the first plan and after provider, module or backend changes. terraform destroy removes everything the configuration manages at the end of its life.
The following diagram shows the commands in order after a fresh clone.

The workflow for individuals and teams
An individual practitioner iterates in a tight loop: edit, plan, fix and plan again until the plan shows exactly the intended changes, then apply. Plans are reviewed by the same person who wrote the code.
In a team, each step gains a control. Writing happens on a branch. Opening a pull request runs a speculative plan, a plan that cannot be applied, and posts the result for reviewers. After approval and merge, a shared system, such as a CI pipeline or HCP Terraform, runs the plan and apply with centrally managed credentials and remote state with locking. Policy checks can block non-compliant plans. The three steps stay the same, but no one applies changes from a personal laptop.
A team change
Ordering the commands
A new team member clones a repository and wants to see what would change if they increased an instance count. In which order should they run the commands?
The decisive fact is that a fresh clone has no .terraform directory.
They run terraform init first, which configures the backend, downloads modules and installs the locked provider versions. After editing the count, they can run terraform fmt and terraform validate, and then terraform plan to see the proposed change. Running plan before init fails with an error telling them to run init.
What are the three steps of the core Terraform workflow?
Show answer
Write, Plan and Apply.
Exam Tips
Remember for the exam
- Core workflow: Write, Plan, Apply.
- init prepares a directory; destroy ends the lifecycle.
- Teams add pull requests, speculative plans and controlled applies.