File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ Note that this example may create resources which cost money. Run `terraform des
4545| Name | Source | Version |
4646| ------| --------| ---------|
4747| <a name =" module_cloudfront_log_bucket " ></a > [ cloudfront\_ log\_ bucket] ( #module\_ cloudfront\_ log\_ bucket ) | ../../ | n/a |
48+ | <a name =" module_disabled " ></a > [ disabled] ( #module\_ disabled ) | ../../ | n/a |
4849| <a name =" module_log_bucket " ></a > [ log\_ bucket] ( #module\_ log\_ bucket ) | ../../ | n/a |
4950| <a name =" module_s3_bucket " ></a > [ s3\_ bucket] ( #module\_ s3\_ bucket ) | ../../ | n/a |
5051| <a name =" module_simple_bucket " ></a > [ simple\_ bucket] ( #module\_ simple\_ bucket ) | ../../ | n/a |
Original file line number Diff line number Diff line change @@ -410,3 +410,9 @@ module "s3_bucket" {
410410 # sse_algorithm = "AES256"
411411 # }
412412}
413+
414+ module "disabled" {
415+ source = " ../../"
416+
417+ create_bucket = false
418+ }
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ locals {
1818
1919 # Placeholders in the policy document to be replaced with the actual values
2020 policy_placeholders = {
21- " _S3_BUCKET_ID_" = var.is_directory_bucket ? aws_s3_directory_bucket.this[0 ].bucket : aws_s3_bucket.this[0 ].id,
22- " _S3_BUCKET_ARN_" = var.is_directory_bucket ? aws_s3_directory_bucket.this[0 ].arn : aws_s3_bucket.this[0 ].arn,
23- " _AWS_ACCOUNT_ID_" = data.aws_caller_identity.current.account_id
21+ " _S3_BUCKET_ID_" = try ( var. is_directory_bucket ? aws_s3_directory_bucket. this [0 ]. bucket : aws_s3_bucket. this [0 ]. id , null ) ,
22+ " _S3_BUCKET_ARN_" = try ( var. is_directory_bucket ? aws_s3_directory_bucket. this [0 ]. arn : aws_s3_bucket. this [0 ]. arn , null ) ,
23+ " _AWS_ACCOUNT_ID_" = try ( data. aws_caller_identity . current . account_id , null )
2424 }
2525
2626 policy = local. create_bucket && local. attach_policy ? replace (
You can’t perform that action at this time.
0 commit comments