# Error: The plan output exceeds the maximum allowed size of 4 MB: the plan has been changed after it was saved

- **ID:** `terraform/terraform-apply-plan-changed`
- **Domain:** terraform
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The saved plan file was modified or regenerated after creation, causing a checksum mismatch when applying.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.6 | active | — | — |
| Terraform v1.7 | active | — | — |
| Terraform v1.8 | active | — | — |

## Workarounds

1. **Regenerate the plan with the same configuration and apply immediately: 'terraform plan -out=plan.tfplan && terraform apply plan.tfplan'.** (90% success)
   ```
   Regenerate the plan with the same configuration and apply immediately: 'terraform plan -out=plan.tfplan && terraform apply plan.tfplan'.
   ```
2. **Use 'terraform apply' directly without a saved plan file to avoid the size limit issue.** (95% success)
   ```
   Use 'terraform apply' directly without a saved plan file to avoid the size limit issue.
   ```

## Dead Ends

- **** — Plan files are binary and checksummed; any manual edit will corrupt the file and cause a different error. (95% fail)
- **** — Terraform does not support incremental plans; each plan is a full snapshot, and splitting does not reduce total size. (80% fail)
- **** — While this works, it bypasses the plan review process and may apply unintended changes. (30% fail)
