Skip to content

Commit

Permalink
Merge pull request #24 from Snowflake-Labs/fix-geff-bucket-acl
Browse files Browse the repository at this point in the history
Add acl only if bucketOnwerPreferred
  • Loading branch information
sfc-gh-pkommini authored Jun 21, 2023
2 parents 2a33a61 + 297caa5 commit 70fe1b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = "~> 1.4.4"
required_version = ">= 1.4.6"

required_providers {
aws = {
Expand Down
1 change: 1 addition & 0 deletions s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resource "aws_s3_bucket_ownership_controls" "geff_bucket_ownership_controls" {
}

resource "aws_s3_bucket_acl" "geff_bucket_acl" {
count = var.bucket_object_ownership_settings == "BucketOwnerPreferred" ? 1 : 0
bucket = aws_s3_bucket.geff_bucket.id
acl = "private"

Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ variable "bucket_object_ownership_settings" {
default = "BucketOwnerEnforced"
}


data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
data "aws_partition" "current" {}
Expand Down

0 comments on commit 70fe1b5

Please sign in to comment.