Interview Prep/Terraform/Workflow and CLI

Why save a plan with `-out` and apply that file?

IntermediateConceptWorkflow and CLI
Answer

terraform plan -out=tfplan freezes exactly what was reviewed. terraform apply tfplan applies those changes without re-planning, so what was approved is what runs. If state changed in the meantime Terraform rejects it as stale. Plan files can contain secrets in plaintext, so store them as protected pipeline artifacts.

All Terraform questions Roadmap: Terraform

More on Workflow and CLI