make naming consistent

pull/32051/head
James Bardin 4 years ago
parent 8a4883fd13
commit 586401aeea

@ -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

@ -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

@ -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
}

@ -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,
}

Loading…
Cancel
Save