Skip to content

Commit

Permalink
Merge pull request #39703 from stefanfreitag/d-aws_cloudfront_log_del…
Browse files Browse the repository at this point in the history
…ivery_canonical_user_id-fix-example

docs: add missing owner to aws_s3_bucket_acl
  • Loading branch information
ewbankkit authored Oct 14, 2024
2 parents 1233990 + 45bcf52 commit af81369
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@ See the [Amazon CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCl
## Example Usage

```terraform
data "aws_canonical_user_id" "current" {}
data "aws_cloudfront_log_delivery_canonical_user_id" "example" {}
resource "aws_s3_bucket" "example" {
bucket = "example"
}
resource "aws_s3_bucket_ownership_controls" "example" {
bucket = aws_s3_bucket.example.id
rule {
object_ownership = "BucketOwnerPreferred"
}
}
resource "aws_s3_bucket_acl" "example" {
bucket = aws_s3_bucket.example.id
Expand All @@ -31,7 +40,11 @@ resource "aws_s3_bucket_acl" "example" {
}
permission = "FULL_CONTROL"
}
owner {
id = data.aws_canonical_user_id.current.id
}
}
depends_on = [aws_s3_bucket_ownership_controls.example]
}
```

Expand Down

0 comments on commit af81369

Please sign in to comment.