From 0122530a0709ced33216059c0b72a21d28c8056c Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Tue, 30 Jun 2020 10:01:49 -0700 Subject: [PATCH 1/2] make statement an array of strings --- builder/amazon/common/run_config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/amazon/common/run_config.go b/builder/amazon/common/run_config.go index cb6b4a9fa..b242f5380 100644 --- a/builder/amazon/common/run_config.go +++ b/builder/amazon/common/run_config.go @@ -55,7 +55,7 @@ type VpcFilterOptions struct { type Statement struct { Effect string Action []string - Resource string + Resource []string } type PolicyDocument struct { From 122e80f5910263076257b9cd4821f41984ff44fc Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Tue, 30 Jun 2020 10:12:50 -0700 Subject: [PATCH 2/2] generated code --- builder/amazon/common/run_config.hcl2spec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/amazon/common/run_config.hcl2spec.go b/builder/amazon/common/run_config.hcl2spec.go index 801f2789f..88dcf0c66 100644 --- a/builder/amazon/common/run_config.hcl2spec.go +++ b/builder/amazon/common/run_config.hcl2spec.go @@ -91,7 +91,7 @@ func (*FlatSecurityGroupFilterOptions) HCL2Spec() map[string]hcldec.Spec { type FlatStatement struct { Effect *string `cty:"effect" hcl:"effect"` Action []string `cty:"action" hcl:"action"` - Resource *string `cty:"resource" hcl:"resource"` + Resource []string `cty:"resource" hcl:"resource"` } // FlatMapstructure returns a new FlatStatement. @@ -108,7 +108,7 @@ func (*FlatStatement) HCL2Spec() map[string]hcldec.Spec { s := map[string]hcldec.Spec{ "effect": &hcldec.AttrSpec{Name: "effect", Type: cty.String, Required: false}, "action": &hcldec.AttrSpec{Name: "action", Type: cty.List(cty.String), Required: false}, - "resource": &hcldec.AttrSpec{Name: "resource", Type: cty.String, Required: false}, + "resource": &hcldec.AttrSpec{Name: "resource", Type: cty.List(cty.String), Required: false}, } return s }