mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
add provider metas to destroy plan
This commit is contained in:
parent
ccd2c7820a
commit
acba1159e4
@ -422,6 +422,12 @@ func (n *NodeAbstractResourceInstance) planDestroy(ctx EvalContext, currentState
|
|||||||
return plan, diags.Append(err)
|
return plan, diags.Append(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
metaConfigVal, metaDiags := n.providerMetas(ctx)
|
||||||
|
diags = diags.Append(metaDiags)
|
||||||
|
if diags.HasErrors() {
|
||||||
|
return plan, diags
|
||||||
|
}
|
||||||
|
|
||||||
// Allow the provider to check the destroy plan, and insert any necessary
|
// Allow the provider to check the destroy plan, and insert any necessary
|
||||||
// private data.
|
// private data.
|
||||||
resp := provider.PlanResourceChange(providers.PlanResourceChangeRequest{
|
resp := provider.PlanResourceChange(providers.PlanResourceChangeRequest{
|
||||||
@ -430,6 +436,7 @@ func (n *NodeAbstractResourceInstance) planDestroy(ctx EvalContext, currentState
|
|||||||
PriorState: unmarkedPriorVal,
|
PriorState: unmarkedPriorVal,
|
||||||
ProposedNewState: nullVal,
|
ProposedNewState: nullVal,
|
||||||
PriorPrivate: currentState.Private,
|
PriorPrivate: currentState.Private,
|
||||||
|
ProviderMeta: metaConfigVal,
|
||||||
})
|
})
|
||||||
|
|
||||||
// We may not have a config for all destroys, but we want to reference it in
|
// We may not have a config for all destroys, but we want to reference it in
|
||||||
|
Loading…
Reference in New Issue
Block a user