Core Workflow for Terraforms
The Terraform core workflow is the loop of writing configuration, running terraform init, terraform plan and terraform apply, and removing resources with terraform destroy. Configuration is written in HCL, using blocks for providers, resources, variables and outputs. This workflow is the base for infrastructure as code, since changes become reviewable text instead of manual clicks.
Stage: Terraform Basics · Part of the Terraform roadmap · Last reviewed 19 November 2026
What to learn in Core Workflow
- Run init, plan and apply and explain what each command does
- Write a resource block with arguments and reference its attributes elsewhere
- Declare input variables and outputs for a configuration
- Read a plan and spot a resource that will be replaced rather than updated
- Explain how infrastructure as code improves repeatability and review
Core Workflow interview questions
What does terraform plan do?
It compares your configuration with the state and the real infrastructure, then shows what Terraform would create, change or destroy, without making changes. Reviewing the plan before apply is the main safety check. In pipelines the plan is often saved and applied exactly as reviewed.
What is the difference between declarative and imperative infrastructure code?
Declarative code, like Terraform, states the desired end result and the tool works out the steps. Imperative scripts list the exact steps to run in order. Declarative tools are easier to repeat safely, because they compare desired and current state before acting.
Where Core Workflow fits in the Terraform roadmap
Core Workflow belongs to the Terraform Basics stage (beginner level), which takes about 17 hours. Declare infrastructure.
Other units in this stage
Back to the full Terraform roadmap