Skip to content

Commit

Permalink
update flatten functions to List type
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Feb 5, 2022
1 parent 06dd8e3 commit c404847
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/service/s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -2155,19 +2155,19 @@ func flattenBucketCorsRules(rules []*s3.CORSRule) []interface{} {
m := make(map[string]interface{})

if len(rule.AllowedHeaders) > 0 {
m["allowed_headers"] = flex.FlattenStringSet(rule.AllowedHeaders)
m["allowed_headers"] = flex.FlattenStringList(rule.AllowedHeaders)
}

if len(rule.AllowedMethods) > 0 {
m["allowed_methods"] = flex.FlattenStringSet(rule.AllowedMethods)
m["allowed_methods"] = flex.FlattenStringList(rule.AllowedMethods)
}

if len(rule.AllowedOrigins) > 0 {
m["allowed_origins"] = flex.FlattenStringSet(rule.AllowedOrigins)
m["allowed_origins"] = flex.FlattenStringList(rule.AllowedOrigins)
}

if len(rule.ExposeHeaders) > 0 {
m["expose_headers"] = flex.FlattenStringSet(rule.ExposeHeaders)
m["expose_headers"] = flex.FlattenStringList(rule.ExposeHeaders)
}

if rule.MaxAgeSeconds != nil {
Expand Down

0 comments on commit c404847

Please sign in to comment.