Skip to content

Commit

Permalink
feat: use s3 request payment config
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocode authored Nov 14, 2024
1 parent ef80318 commit 18c1742
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -623,3 +623,11 @@ resource "aws_s3_directory_bucket" "default" {
name = var.availability_zone_id
}
}

resource "aws_s3_bucket_request_payment_configuration" "default" {
count = local.enabled && var.s3_request_payment_configuration.enabled ? 1 : 0

bucket = local.bucket_id
expected_bucket_owner = var.s3_request_payment_configuration.expected_bucket_owner
payer = lower(var.s3_request_payment_configuration.payer) == "requester" ? "Requester" : "BucketOwner"
}

0 comments on commit 18c1742

Please sign in to comment.