0
0
Terraformcloud~5 mins

Plan and apply separation in pipelines in Terraform - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of separating 'plan' and 'apply' stages in Terraform pipelines?
Separating 'plan' and 'apply' stages helps to review and approve infrastructure changes before they are made, reducing errors and improving control.
Click to reveal answer
beginner
In Terraform pipelines, what does the 'terraform plan' command do?
It creates an execution plan showing what changes Terraform will make to reach the desired state without applying them.
Click to reveal answer
intermediate
Why is it important to store the Terraform plan output and use it in the apply stage?
Storing the plan output ensures that the exact reviewed plan is applied, preventing unexpected changes during apply.
Click to reveal answer
intermediate
How can manual approval be integrated between plan and apply stages in a pipeline?
By adding a manual approval step after the plan stage, teams can review the plan output and confirm before applying changes.
Click to reveal answer
beginner
What is a common tool or service used to automate Terraform pipelines with plan and apply separation?
CI/CD tools like GitHub Actions, GitLab CI, or Jenkins are commonly used to automate Terraform pipelines with separate plan and apply stages.
Click to reveal answer
What does the 'terraform apply' command do?
AShows the planned changes without applying them
BValidates the Terraform configuration syntax only
CApplies the changes to reach the desired infrastructure state
DDeletes all infrastructure resources
Why should the plan output be saved and reused in the apply stage?
ATo speed up the apply process
BTo automatically approve changes
CTo avoid running terraform init again
DTo ensure the exact reviewed plan is applied
What is a benefit of adding a manual approval step between plan and apply?
AIt allows review and prevents accidental changes
BIt speeds up deployment
CIt automatically fixes errors
DIt removes the need for version control
Which command generates a Terraform execution plan?
Aterraform plan
Bterraform apply
Cterraform init
Dterraform validate
Which tool can be used to automate Terraform pipelines with plan and apply separation?
AMicrosoft Word
BGitHub Actions
CAdobe Photoshop
DSlack
Explain why separating the 'plan' and 'apply' stages in Terraform pipelines is a best practice.
Think about how reviewing before doing helps avoid mistakes.
You got /4 concepts.
    Describe how you would implement a pipeline that separates Terraform plan and apply stages with manual approval.
    Consider the flow from planning to approval to applying.
    You got /4 concepts.