Applying a Saved Plan Fails
A pipeline runs terraform plan -out=tfplan on the PR and terraform apply tfplan after merge. Today the apply fails with "Saved plan is stale". What happened?
terraform plan -out=tfplan
terraform apply tfplan
Choose one answer
The PR was squash-merged, which changes the commit the plan was made for.
A provider released a new version, which invalidates older plan files.
The state changed after the plan was made, for example by another apply.
The plan file expired, because saved plans are valid for only one hour.