saved plan
A plan written to a file with -out, which terraform apply can later carry out exactly as reviewed.
A plan file can contain secrets in plain text, so anyone who can read the artifact can read them.
In more detail
The file records the precise actions decided against the state at that moment. Applying it asks no question and refuses if state has moved on, which closes the gap between what was reviewed and what is done. The file can contain sensitive values, so store it as carefully as state.
Example
terraform plan -out=tfplan
terraform apply tfplanRelated terms
- terraform plan — The command that compares configuration, state and reality and prints the actions needed to make them match, without changing anything.
- terraform apply — The command that carries out a plan, creating, changing and deleting real infrastructure, then records the result in state.
- terraform show — The command that prints the current state, or the contents of a saved plan file, in readable or JSON form.
- artifact — A file produced by a build, such as a compiled program or an image, that is stored and passed on to later steps.
Taught in
- Infrastructure As Code In The Pipeline — Microsoft Azure DevOps Engineer Expert (AZ-400) Exam Prep
- Enforcing OPA Guardrails on Terraform Plan Payloads — Cloud Security & DevSecOps Engineering
- Predicting Changes, Then Applying Them — Infrastructure as Code with Terraform
- Scaling Resources With Count — Infrastructure as Code with Terraform
- Iterating Over Maps With For Each — Infrastructure as Code with Terraform
- Explicit Dependencies With Depends On — Infrastructure as Code with Terraform
- Safe Changes With Lifecycle Rules — Infrastructure as Code with Terraform
- Provisioners: Why They Are A Last Resort — Infrastructure as Code with Terraform
- Running Terraform In CI — Infrastructure as Code with Terraform
- Native Testing With Tftest Files — Infrastructure as Code with Terraform
- Provider Mocking For Tests — Infrastructure as Code with Terraform
- Policy As Code With OPA — Infrastructure as Code with Terraform
- Releasing The Real Cloud Artifact — Infrastructure as Code with Terraform
- Write, Plan, Apply, And What Init Prepares — HashiCorp Terraform Associate (004) Exam Prep
- Reading A Plan, Saving It, Applying It — HashiCorp Terraform Associate (004) Exam Prep
- Sensitive Data, Ephemeral Values And Secrets From Vault — HashiCorp Terraform Associate (004) Exam Prep
- Inspecting And Repairing State From The CLI — HashiCorp Terraform Associate (004) Exam Prep
- The Full Mock: Sixty Minutes, Eight Areas, One Plan For The Last Week — HashiCorp Terraform Associate (004) Exam Prep