mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-18 12:42:58 -06:00
not all plan action changes are provider bugs
A provider cannot influence CreateThenDelete vs DeleteThenCreate, so we shouldn't attribute this to the provider in the error.
This commit is contained in:
parent
b8b6cae8ef
commit
cf6bc7163a
@ -59,6 +59,18 @@ func (n *EvalCheckPlannedChange) Eval(ctx EvalContext) (interface{}, error) {
|
|||||||
// all of the unknown values, since the final values might actually
|
// all of the unknown values, since the final values might actually
|
||||||
// match what was there before after all.
|
// match what was there before after all.
|
||||||
log.Printf("[DEBUG] After incorporating new values learned so far during apply, %s change has become NoOp", absAddr)
|
log.Printf("[DEBUG] After incorporating new values learned so far during apply, %s change has become NoOp", absAddr)
|
||||||
|
|
||||||
|
case (plannedChange.Action == plans.CreateThenDelete && actualChange.Action == plans.DeleteThenCreate) ||
|
||||||
|
(plannedChange.Action == plans.DeleteThenCreate && actualChange.Action == plans.CreateThenDelete):
|
||||||
|
// If the order of replacement changed, then that is a bug in terraform
|
||||||
|
diags = diags.Append(tfdiags.Sourceless(
|
||||||
|
tfdiags.Error,
|
||||||
|
"Terraform produced inconsistent final plan",
|
||||||
|
fmt.Sprintf(
|
||||||
|
"When expanding the plan for %s to include new values learned so far during apply, the planned action changed from %s to %s.\n\nThis is a bug in Terraform and should be reported.",
|
||||||
|
absAddr, plannedChange.Action, actualChange.Action,
|
||||||
|
),
|
||||||
|
))
|
||||||
default:
|
default:
|
||||||
diags = diags.Append(tfdiags.Sourceless(
|
diags = diags.Append(tfdiags.Sourceless(
|
||||||
tfdiags.Error,
|
tfdiags.Error,
|
||||||
|
Loading…
Reference in New Issue
Block a user