Skip to content

Commit

Permalink
r/s3_bucket_logging: new resource
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 committed Feb 3, 2022
1 parent 5cbf147 commit a85f96d
Show file tree
Hide file tree
Showing 6 changed files with 1,019 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/22608.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_s3_bucket_logging
```
1 change: 1 addition & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,7 @@ func Provider() *schema.Provider {
"aws_s3_bucket_cors_configuration": s3.ResourceBucketCorsConfiguration(),
"aws_s3_bucket_intelligent_tiering_configuration": s3.ResourceBucketIntelligentTieringConfiguration(),
"aws_s3_bucket_inventory": s3.ResourceBucketInventory(),
"aws_s3_bucket_logging": s3.ResourceBucketLogging(),
"aws_s3_bucket_metric": s3.ResourceBucketMetric(),
"aws_s3_bucket_notification": s3.ResourceBucketNotification(),
"aws_s3_bucket_ownership_controls": s3.ResourceBucketOwnershipControls(),
Expand Down
4 changes: 2 additions & 2 deletions internal/service/s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func resourceBucketUpdate(d *schema.ResourceData, meta interface{}) error {
}

if d.HasChange("logging") {
if err := resourceBucketLoggingUpdate(conn, d); err != nil {
if err := resourceBucketInternalLoggingUpdate(conn, d); err != nil {
return err
}
}
Expand Down Expand Up @@ -1868,7 +1868,7 @@ func resourceBucketInternalVersioningUpdate(conn *s3.S3, bucket string, versioni
return nil
}

func resourceBucketLoggingUpdate(conn *s3.S3, d *schema.ResourceData) error {
func resourceBucketInternalLoggingUpdate(conn *s3.S3, d *schema.ResourceData) error {
logging := d.Get("logging").(*schema.Set).List()
bucket := d.Get("bucket").(string)
loggingStatus := &s3.BucketLoggingStatus{}
Expand Down
Loading

0 comments on commit a85f96d

Please sign in to comment.