diff --git a/main.tf b/main.tf index 0ddcaf1..42ee00e 100644 --- a/main.tf +++ b/main.tf @@ -69,7 +69,7 @@ module "access_logs" { } resource "aws_lb" "default" { - name = module.default_label.id + name = var.alb_name == "" ? module.default_label.id : var.alb_name tags = module.default_label.tags internal = var.internal load_balancer_type = "application" diff --git a/variables.tf b/variables.tf index 0c33823..8fb6a5d 100644 --- a/variables.tf +++ b/variables.tf @@ -55,6 +55,12 @@ variable "security_group_ids" { description = "A list of additional security group IDs to allow access to ALB" } +variable "alb_name" { + type = string + default = "" + description = "The name for the load balancer, uses a module label name if left empty" +} + variable "internal" { type = bool default = false