mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
skip inter-provider cycle check in destroy plan
Just like in the destroy apply, we can skip the inter-provider cycle check when creating the destroy plan, which can be expensive when there are a lot of resource instances with dependencies from another provider.
This commit is contained in:
parent
357012a2f3
commit
583350a5c4
@ -191,7 +191,9 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer {
|
|||||||
|
|
||||||
// DestroyEdgeTransformer is only required during a plan so that the
|
// DestroyEdgeTransformer is only required during a plan so that the
|
||||||
// TargetsTransformer can determine which nodes to keep in the graph.
|
// TargetsTransformer can determine which nodes to keep in the graph.
|
||||||
&DestroyEdgeTransformer{},
|
&DestroyEdgeTransformer{
|
||||||
|
Operation: b.Operation,
|
||||||
|
},
|
||||||
|
|
||||||
&pruneUnusedNodesTransformer{
|
&pruneUnusedNodesTransformer{
|
||||||
skip: b.Operation != walkPlanDestroy,
|
skip: b.Operation != walkPlanDestroy,
|
||||||
|
@ -88,7 +88,7 @@ func (t *DestroyEdgeTransformer) tryInterProviderDestroyEdge(g *Graph, from, to
|
|||||||
|
|
||||||
// If this is a complete destroy operation, then there are no create/update
|
// If this is a complete destroy operation, then there are no create/update
|
||||||
// nodes to worry about and we can accept the edge without deeper inspection.
|
// nodes to worry about and we can accept the edge without deeper inspection.
|
||||||
if t.Operation == walkDestroy {
|
if t.Operation == walkDestroy || t.Operation == walkPlanDestroy {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user