diff --git a/internal/terraform/graph_builder_apply.go b/internal/terraform/graph_builder_apply.go index f86fe7205a..40a2979c70 100644 --- a/internal/terraform/graph_builder_apply.go +++ b/internal/terraform/graph_builder_apply.go @@ -97,7 +97,7 @@ func (b *ApplyGraphBuilder) Steps() []GraphTransformer { &LocalTransformer{Config: b.Config}, &OutputTransformer{ Config: b.Config, - DestroyApply: b.Operation == walkDestroy, + ApplyDestroy: b.Operation == walkDestroy, }, // Creates all the resource instances represented in the diff, along diff --git a/internal/terraform/graph_builder_plan.go b/internal/terraform/graph_builder_plan.go index 70df371688..4195a7445a 100644 --- a/internal/terraform/graph_builder_plan.go +++ b/internal/terraform/graph_builder_plan.go @@ -112,7 +112,7 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer { &OutputTransformer{ Config: b.Config, RefreshOnly: b.skipPlanChanges, - DestroyPlan: b.Operation == walkPlanDestroy, + PlanDestroy: b.Operation == walkPlanDestroy, // NOTE: We currently treat anything built with the plan graph // builder as "planning" for our purposes here, because we share diff --git a/internal/terraform/node_output.go b/internal/terraform/node_output.go index 08265ea4d8..1079a59df3 100644 --- a/internal/terraform/node_output.go +++ b/internal/terraform/node_output.go @@ -23,8 +23,8 @@ type nodeExpandOutput struct { Addr addrs.OutputValue Module addrs.Module Config *configs.Output - DestroyPlan bool - DestroyApply bool + PlanDestroy bool + ApplyDestroy bool RefreshOnly bool // Planning is set to true when this node is in a graph that was produced @@ -100,12 +100,12 @@ func (n *nodeExpandOutput) DynamicExpand(ctx EvalContext) (*Graph, error) { var node dag.Vertex switch { - case module.IsRoot() && (n.DestroyPlan || n.DestroyApply): + case module.IsRoot() && (n.PlanDestroy || n.ApplyDestroy): node = &NodeDestroyableOutput{ Addr: absAddr, } - case n.DestroyPlan: + case n.PlanDestroy: // nothing is done here for non-root outputs continue @@ -115,7 +115,7 @@ func (n *nodeExpandOutput) DynamicExpand(ctx EvalContext) (*Graph, error) { Config: n.Config, Change: change, RefreshOnly: n.RefreshOnly, - DestroyApply: n.DestroyApply, + DestroyApply: n.ApplyDestroy, } } @@ -181,7 +181,7 @@ func (n *nodeExpandOutput) ReferenceOutside() (selfPath, referencePath addrs.Mod // GraphNodeReferencer func (n *nodeExpandOutput) References() []*addrs.Reference { // DestroyNodes do not reference anything. - if n.Module.IsRoot() && n.DestroyApply { + if n.Module.IsRoot() && n.ApplyDestroy { return nil } diff --git a/internal/terraform/transform_output.go b/internal/terraform/transform_output.go index 9ee09c0e92..214bc3ff10 100644 --- a/internal/terraform/transform_output.go +++ b/internal/terraform/transform_output.go @@ -26,11 +26,11 @@ type OutputTransformer struct { // If this is a planned destroy, root outputs are still in the configuration // so we need to record that we wish to remove them - DestroyPlan bool + PlanDestroy bool - // DestroyApply indicates that this is being added to an apply graph, which + // ApplyDestroy indicates that this is being added to an apply graph, which // is the result of a destroy plan. - DestroyApply bool + ApplyDestroy bool } func (t *OutputTransformer) Transform(g *Graph) error { @@ -59,8 +59,8 @@ func (t *OutputTransformer) transform(g *Graph, c *configs.Config) error { Addr: addr, Module: c.Path, Config: o, - DestroyPlan: t.DestroyPlan, - DestroyApply: t.DestroyApply, + PlanDestroy: t.PlanDestroy, + ApplyDestroy: t.ApplyDestroy, RefreshOnly: t.RefreshOnly, Planning: t.Planning, }