Skip to content

Commit

Permalink
fix privileged_principal_arns not creating bucket policy (#101)
Browse files Browse the repository at this point in the history
* fix privileged_principal_arns not creating bucket policy

* Auto Format

Co-authored-by: julian <[email protected]>
Co-authored-by: cloudpossebot <[email protected]>
  • Loading branch information
3 people authored Aug 11, 2021
1 parent 3c2cde9 commit 12ac1d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ data "aws_iam_policy_document" "aggregated_policy" {
}

resource "aws_s3_bucket_policy" "default" {
count = local.enabled && (var.allow_ssl_requests_only || var.allow_encrypted_uploads_only || length(var.s3_replication_source_roles) > 0 || var.policy != "") ? 1 : 0
count = local.enabled && (var.allow_ssl_requests_only || var.allow_encrypted_uploads_only || length(var.s3_replication_source_roles) > 0 || length(var.privileged_principal_arns) > 0 || var.policy != "") ? 1 : 0
bucket = join("", aws_s3_bucket.default.*.id)
policy = join("", data.aws_iam_policy_document.aggregated_policy.*.json)
depends_on = [aws_s3_bucket_public_access_block.default]
Expand Down

0 comments on commit 12ac1d8

Please sign in to comment.