minamijoyo / tfmigrate

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

Continue to plan to_dir for multi_state if force is true #139

Closed chrissng closed 1 year ago

chrissng commented 1 year ago

What

In multi_state mode, from_dir will be planned first before planning the to_dir. When force = true and there are unexpected diffs for the from_dir, the check for the to_dir will be skipped.

If to_dir check is skipped in this case, we wont be able to confirm any unexpected changes.

This PR addresses this issue by ensuring that both from_dir and to_dir will be checked.

How

If force = true and there are unexpected diffs in the from_dir plan check, instead of returning the function immediately, continue to check to_dir.

minamijoyo commented 1 year ago

I'm waiting for Terraform v1.5 reaches to GA before I cut a new release of tfmigrate, but even if it doesn't come soon, I will cut a new release in a week or so.

minamijoyo commented 1 year ago

tfmigrate v0.3.12 has been released.