← Back to blog
bpdubuntu
The Core Terraform Workflow: Init, Plan, and Apply
21 January 2026bpd · ubuntu
A Safe and Predictable Way to Manage Infrastructure
Terraform’s power lies in its safe and predictable workflow, which is broken down into three main commands. The ‘Ubuntu System Administration Guide’ explains this core workflow in the context of deploying an application to Kubernetes.
The Three Key Commands
- `terraform init`: This is the first command you run in a new Terraform project. It initializes the working directory, downloading the necessary providers (like the Kubernetes provider) that Terraform needs to communicate with the target API.
- `terraform plan`: This command is a ‘dry run’. Terraform compares your configuration files to the current state of your infrastructure and shows you exactly what it *plans* to do (which resources will be created, updated, or destroyed). This is a crucial step to review before making any changes.
- `terraform apply`: After reviewing the plan, this is the command that executes the changes. Terraform will perform the actions outlined in the plan to bring your infrastructure to the desired state.
This workflow ensures that you always know what changes are going to be made before they happen, preventing costly mistakes.
This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13