Plan and apply separation in pipelines
📖 Scenario: You are working in a team managing cloud infrastructure using Terraform. To keep your deployment process safe and organized, you want to separate the planning and applying steps into two different pipeline stages. This helps catch errors before making changes live.
🎯 Goal: Build a Terraform pipeline configuration that clearly separates the terraform plan step from the terraform apply step using two distinct pipeline jobs.
📋 What You'll Learn
Create a Terraform pipeline with two jobs:
plan and applyThe
plan job runs terraform init and terraform planThe
apply job runs terraform apply only after plan succeedsUse a variable to control the Terraform workspace name
💡 Why This Matters
🌍 Real World
Separating plan and apply steps in Terraform pipelines is a common practice in real-world cloud infrastructure management to prevent accidental changes and improve safety.
💼 Career
Cloud engineers and DevOps professionals use this pattern daily to maintain reliable and controlled infrastructure deployments.
Progress0 / 4 steps