diff --git a/plans/changes.go b/plans/changes.go index 69bfffaaa..1b85ba21c 100644 --- a/plans/changes.go +++ b/plans/changes.go @@ -32,7 +32,12 @@ func NewChanges() *Changes { } func (c *Changes) Empty() bool { - return (len(c.Resources) + len(c.Outputs)) == 0 + for _, res := range c.Resources { + if res.Action != NoOp { + return false + } + } + return true } // ResourceInstance returns the planned change for the current object of the diff --git a/plans/plan_test.go b/plans/plan_test.go index d6c2f769a..f68357072 100644 --- a/plans/plan_test.go +++ b/plans/plan_test.go @@ -13,7 +13,6 @@ func TestProviderAddrs(t *testing.T) { plan := &Plan{ VariableValues: map[string]DynamicValue{}, Changes: &Changes{ - RootOutputs: map[string]*OutputChangeSrc{}, Resources: []*ResourceInstanceChangeSrc{ { Addr: addrs.Resource{