Skip to content

Commit

Permalink
r/s3_bucket_acl: new resource
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Mar 11, 2022
1 parent 49ff9c0 commit c0fccd2
Show file tree
Hide file tree
Showing 6 changed files with 1,235 additions and 6 deletions.
1 change: 1 addition & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,7 @@ func Provider() *schema.Provider {
"aws_route53_resolver_rule_association": route53resolver.ResourceRuleAssociation(),

"aws_s3_bucket": s3.ResourceBucket(),
"aws_s3_bucket_acl": s3.ResourceBucketAcl(),
"aws_s3_bucket_analytics_configuration": s3.ResourceBucketAnalyticsConfiguration(),
"aws_s3_bucket_intelligent_tiering_configuration": s3.ResourceBucketIntelligentTieringConfiguration(),
"aws_s3_bucket_inventory": s3.ResourceBucketInventory(),
Expand Down
14 changes: 10 additions & 4 deletions internal/service/s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,21 @@ func ResourceBucket() *schema.Resource {
Optional: true,
ConflictsWith: []string{"grant"},
ValidateFunc: validation.StringInSlice(BucketCannedACL_Values(), false),
Deprecated: "Use the aws_s3_bucket_acl resource instead",
},

"grant": {
Type: schema.TypeSet,
Optional: true,
Set: grantHash,
ConflictsWith: []string{"acl"},
Deprecated: "Use the aws_s3_bucket_acl resource instead",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"id": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Deprecated: "Use the aws_s3_bucket_acl resource instead",
},
"type": {
Type: schema.TypeString,
Expand All @@ -102,10 +105,12 @@ func ResourceBucket() *schema.Resource {
s3.TypeCanonicalUser,
s3.TypeGroup,
}, false),
Deprecated: "Use the aws_s3_bucket_acl resource instead",
},
"uri": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Deprecated: "Use the aws_s3_bucket_acl resource instead",
},

"permissions": {
Expand All @@ -115,6 +120,7 @@ func ResourceBucket() *schema.Resource {
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice(s3.Permission_Values(), false),
Deprecated: "Use the aws_s3_bucket_acl resource instead",
},
},
},
Expand Down
Loading

0 comments on commit c0fccd2

Please sign in to comment.