Merge pull request #9509 from hashicorp/fix_9508

make statement an array of strings
This commit is contained in:
Megan Marsh 2020-06-30 13:15:51 -07:00 committed by GitHub
commit af9d2e6f22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ type VpcFilterOptions struct {
type Statement struct {
Effect string
Action []string
Resource string
Resource []string
}
type PolicyDocument struct {

View File

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