Add the ability to migrate terraform state
- Dominant language
- Go
- Stars
- 26
- Forks
- 7
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
### TL;DR
Provide the ability for users to inform guardian that the state file needs to be migrated.
### Detailed design
Use PR body comments to determine if the `-migrate-state` flag should be used in the terraform init command.
This would require two phases:
1. Checkout the main branch, run `terraform init`
2. Checkout the PR branch, run `terraform init -migrate-state`
- This would leave the existing state intact, so if the plan/apply failed, it would be a no-op
4. Continue with the `plan` and `apply`
There should be a separate and distinct step to remove the old state file after a successful plan and apply.
### Alternatives considered
_No response_
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.