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.
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.
What
In
multi_state
mode,from_dir
will be planned first before planning theto_dir
. Whenforce = true
and there are unexpected diffs for thefrom_dir
, the check for theto_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
andto_dir
will be checked.How
If
force = true
and there are unexpected diffs in thefrom_dir
plan check, instead of returning the function immediately, continue to checkto_dir
.