stacks: actions for a no-op change are a concrete list (#34260)

pull/34283/head
Liam Cervante 2 years ago committed by GitHub
parent ccb5596742
commit afc83356ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,10 +7,11 @@ import (
"fmt"
"math/big"
"github.com/zclconf/go-cty/cty"
"github.com/hashicorp/terraform/internal/lang/marks"
"github.com/hashicorp/terraform/internal/plans"
"github.com/hashicorp/terraform/internal/stacks/stackaddrs"
"github.com/zclconf/go-cty/cty"
)
// This file contains some hand-written type conversion helpers to complement
@ -21,7 +22,7 @@ import (
func ChangeTypesForPlanAction(action plans.Action) ([]ChangeType, error) {
switch action {
case plans.NoOp:
return nil, nil
return []ChangeType{ChangeType_NOOP}, nil
case plans.Create:
return []ChangeType{ChangeType_CREATE}, nil
case plans.Read:

@ -146,6 +146,7 @@ func TestPlannedChangeAsProto(t *testing.T) {
{
Description: &terraform1.PlannedChange_ChangeDescription_ComponentInstancePlanned{
ComponentInstancePlanned: &terraform1.PlannedChange_ComponentInstance{
Actions: []terraform1.ChangeType{terraform1.ChangeType_NOOP},
Addr: &terraform1.ComponentInstanceInStackAddr{
ComponentAddr: "component.foo",
ComponentInstanceAddr: `component.foo["bar"]`,

Loading…
Cancel
Save