mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
apply edge transforamtions after references
We can't correctly resolve the destroy ordering if all references haven't been assigned to each node.
This commit is contained in:
parent
cca36025d6
commit
7c703b1bbf
@ -127,21 +127,6 @@ func (b *ApplyGraphBuilder) Steps() []GraphTransformer {
|
|||||||
// Attach the state
|
// Attach the state
|
||||||
&AttachStateTransformer{State: b.State},
|
&AttachStateTransformer{State: b.State},
|
||||||
|
|
||||||
// Destruction ordering
|
|
||||||
&DestroyEdgeTransformer{
|
|
||||||
Config: b.Config,
|
|
||||||
State: b.State,
|
|
||||||
Schemas: b.Schemas,
|
|
||||||
},
|
|
||||||
GraphTransformIf(
|
|
||||||
func() bool { return !b.Destroy },
|
|
||||||
&CBDEdgeTransformer{
|
|
||||||
Config: b.Config,
|
|
||||||
State: b.State,
|
|
||||||
Schemas: b.Schemas,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
// Provisioner-related transformations
|
// Provisioner-related transformations
|
||||||
&MissingProvisionerTransformer{Provisioners: b.Components.ResourceProvisioners()},
|
&MissingProvisionerTransformer{Provisioners: b.Components.ResourceProvisioners()},
|
||||||
&ProvisionerTransformer{},
|
&ProvisionerTransformer{},
|
||||||
@ -171,6 +156,21 @@ func (b *ApplyGraphBuilder) Steps() []GraphTransformer {
|
|||||||
// Connect references so ordering is correct
|
// Connect references so ordering is correct
|
||||||
&ReferenceTransformer{},
|
&ReferenceTransformer{},
|
||||||
|
|
||||||
|
// Destruction ordering
|
||||||
|
&DestroyEdgeTransformer{
|
||||||
|
Config: b.Config,
|
||||||
|
State: b.State,
|
||||||
|
Schemas: b.Schemas,
|
||||||
|
},
|
||||||
|
GraphTransformIf(
|
||||||
|
func() bool { return !b.Destroy },
|
||||||
|
&CBDEdgeTransformer{
|
||||||
|
Config: b.Config,
|
||||||
|
State: b.State,
|
||||||
|
Schemas: b.Schemas,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
// Handle destroy time transformations for output and local values.
|
// Handle destroy time transformations for output and local values.
|
||||||
// Reverse the edges from outputs and locals, so that
|
// Reverse the edges from outputs and locals, so that
|
||||||
// interpolations don't fail during destroy.
|
// interpolations don't fail during destroy.
|
||||||
|
Loading…
Reference in New Issue
Block a user