From f845b4012a0a79bca717d149b8ffc808e80255a6 Mon Sep 17 00:00:00 2001 From: Miguel Elhaiek Date: Wed, 10 Apr 2024 16:52:00 -0300 Subject: [PATCH] Adding depends_on to alb on bucket policy --- terraform/alb.tf | 2 +- terraform/modules/alb_logging/outputs.tf | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/terraform/alb.tf b/terraform/alb.tf index 30a87e3..feade43 100644 --- a/terraform/alb.tf +++ b/terraform/alb.tf @@ -26,7 +26,7 @@ resource "aws_lb" "vectorstore_nlb" { depends_on = [ module.alb_logging.s3_bucket_policy_arn, - module.alb_logging.aws_s3_bucket.logging_bucket + module.alb_logging.s3_bucket_arn ] } diff --git a/terraform/modules/alb_logging/outputs.tf b/terraform/modules/alb_logging/outputs.tf index 89d9be7..6f618fb 100644 --- a/terraform/modules/alb_logging/outputs.tf +++ b/terraform/modules/alb_logging/outputs.tf @@ -7,3 +7,8 @@ output "bucket_name_output" { output "s3_bucket_policy_arn" { value = aws_s3_bucket_policy.bucket_policy.policy } + + +output "s3_bucket_arn" { + value = aws_s3_bucket.logging_bucket.bucket +}