Skip to content

Commit

Permalink
minor modification on S3 bucket ACL
Browse files Browse the repository at this point in the history
  • Loading branch information
mpvgithub committed Sep 27, 2023
1 parent 7596b3a commit c54dd2b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated the terraform provider version for AWS to 5.17.0 (ecs plugin)
- Disabled `enable_nat_gateway` on the vpc module, since it was throwing error from the respective module

### Added
- Added ownership controls for S3 bucket for supporting S3 bucket ACL

## [0.31.0] - 2023-09-20

### Changed
Expand Down
13 changes: 11 additions & 2 deletions covalent_ecs_plugin/assets/infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ resource "aws_s3_bucket" "bucket" {
force_destroy = true
}

resource "aws_s3_bucket_acl" "bucket_acl" {
resource "aws_s3_bucket_ownership_controls" "ownership_controls" {
bucket = aws_s3_bucket.bucket.id
acl = "private"

rule {
object_ownership = "BucketOwnerPreferred"
}
}

resource "aws_s3_bucket_acl" "bucket_acl" {
depends_on = [aws_s3_bucket_ownership_controls.ownership_controls]
bucket = aws_s3_bucket.bucket.id
acl = "private"
}

resource "aws_ecr_repository" "ecr_repository" {
Expand Down

0 comments on commit c54dd2b

Please sign in to comment.