minamijoyo / tfmigrate

A Terraform / OpenTofu state migration tool for GitOps
MIT License
1.14k stars 57 forks source link

Fix a regression issue of error handling in multi_state migration #141

Closed minamijoyo closed 1 year ago

minamijoyo commented 1 year ago

Fixes #140

We slightly fixed the behavior of the force option in #139, but the fix introduced a regression in error handling; errors in plan commands, except for detected diffs, should not be ignored regardless of force or not.

A single-state migration implementation did not have this bug because it had a similar but different implementation, but I'll take this opportunity to use the same logic.