-
-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix issue with ALB bucket output name and name in general #247
Conversation
main.tf
Outdated
@@ -1103,7 +1103,7 @@ module "elb_logs" { | |||
source = "cloudposse/lb-s3-bucket/aws" | |||
version = "0.19.0" | |||
enabled = var.enable_loadbalancer_logs && local.enabled && var.tier == "WebServer" && var.environment_type == "LoadBalanced" && var.loadbalancer_type != "network" && !var.loadbalancer_is_shared ? true : false | |||
name = "${module.this.id}-alb-logs-${random_string.elb_logs_suffix.result}" | |||
name = var.s3_bucket_access_log_bucket_name != "" ? var.s3_bucket_access_log_bucket_name : "${module.this.id}-alb-logs-${random_string.elb_logs_suffix.result}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the output and the resource name should use a local so they're reading from the same value.
outputs.tf
Outdated
@@ -84,7 +84,7 @@ output "load_balancers" { | |||
} | |||
|
|||
output "load_balancer_log_bucket" { | |||
value = var.enable_loadbalancer_logs ? "${module.this.id}-eb-loadbalancer-logs-${random_string.elb_logs_suffix.result}" : null | |||
value = var.s3_bucket_access_log_bucket_name != "" ? var.s3_bucket_access_log_bucket_name : "${module.this.id}-alb-logs-${random_string.elb_logs_suffix.result}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think the output should output the log bucket name event when logging is disabled?
47b2642
to
d2c4009
Compare
/terratest |
Thanks for your contribution @gugaiz |
what
This fixes the issue with the output of the ALB bucket name, it also incorporates the option to manually set the bucket name to make it backward compatible with the previous deployment (what already has the bucket name assigned)
why
Because it is a bug that is on production code as commented on here