diff --git a/alb.tf b/alb.tf index 549d3f7..d72f122 100644 --- a/alb.tf +++ b/alb.tf @@ -20,6 +20,7 @@ resource "aws_alb" "consul" { } access_logs { + enabled = var.lb_logs_enabled bucket = var.alb_log_bucket prefix = "logs/elb/${data.aws_vpc.vpc.tags["Name"]}/consul" } @@ -94,4 +95,3 @@ resource "aws_alb_listener_certificate" "consul_https" { listener_arn = aws_alb_listener.consul_https[0].arn certificate_arn = data.aws_acm_certificate.cert[0].arn } - diff --git a/variables.tf b/variables.tf index 477a8fc..a9b04da 100644 --- a/variables.tf +++ b/variables.tf @@ -2,6 +2,10 @@ variable "alb_log_bucket" { description = "s3 bucket to send ALB Logs" } +variable "lb_logs_enabled" { + default = "true" +} + variable "lb_deregistration_delay" { description = "The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds." default = "300" @@ -159,4 +163,3 @@ variable "oauth2_proxy_client_id" { variable "oauth2_proxy_client_secret" { description = "the OAuth Client Secret" } -