Skip to content

Commit d7a4943

Browse files
Fix source_policy_documents combined with var.policy being ignored (#201)
* fix: source_policy_documents combined with var.policy is ignored * fix readme --------- Co-authored-by: Matt Calhoun <[email protected]>
1 parent 7030cbd commit d7a4943

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ We highly recommend that in your code you pin the version to the exact version y
111111
using so that your infrastructure remains stable, and update versions in a
112112
systematic way so that they do not catch you by surprise.
113113

114-
Also, because of a bug in the Terraform registry ([hashicorp/terraform#21417](https://github.com/hashicorp/terraform/issues/21417)),
115-
the registry shows many of our inputs as required when in fact they are optional.
116-
The table below correctly indicates which inputs are required.
117-
118114

119115
Using a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
120116

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ data "aws_iam_policy_document" "aggregated_policy" {
459459
}
460460

461461
resource "aws_s3_bucket_policy" "default" {
462-
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 || length(var.source_policy_documents) > 0) ? 1 : 0
462+
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 || length(local.source_policy_documents) > 0) ? 1 : 0
463463
bucket = join("", aws_s3_bucket.default[*].id)
464464
policy = join("", data.aws_iam_policy_document.aggregated_policy[*].json)
465465
depends_on = [aws_s3_bucket_public_access_block.default]

0 commit comments

Comments
 (0)