diff --git a/lb-domain/main.tf b/lb-domain/main.tf index f41f66c..ae4649e 100644 --- a/lb-domain/main.tf +++ b/lb-domain/main.tf @@ -26,7 +26,7 @@ locals { ] custom_domain_dns_record = { - name = "custom-loadbalancer" + name = var.custom_domain_record_value type = "CNAME" ttl = 300 records = [ diff --git a/lb-domain/variables.tf b/lb-domain/variables.tf index fb8e879..964919f 100644 --- a/lb-domain/variables.tf +++ b/lb-domain/variables.tf @@ -19,6 +19,12 @@ variable "create_custom_domain_record" { default = false } +variable "custom_domain_record_value" { + type = string + description = "The value of the custom domain record" + default = "custom-loadbalancer" +} + variable "tags" { type = map(string) description = "A map of tags to add to all resources"