diff --git a/terraform/main.tf b/terraform/main.tf index 31698733..aa7c12e9 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -104,6 +104,7 @@ module "dns" { source = "./modules/dns" dns_zone_name = "imo-msw-dev.kystverket.cloud" dns_resource_group_name = "rg-dns" + dns_prefix = "preview" resource_group_name = azurerm_resource_group.imo_app.name container_app_id = module.frontend.container_app_id frontend_fqdn = module.frontend.fqdn diff --git a/terraform/modules/dns/frontend.tf b/terraform/modules/dns/frontend.tf index 3c572c3c..ddcaa1d6 100644 --- a/terraform/modules/dns/frontend.tf +++ b/terraform/modules/dns/frontend.tf @@ -1,5 +1,5 @@ resource "azurerm_dns_cname_record" "frontend" { - name = "www" + name = var.dns_prefix zone_name = var.dns_zone_name resource_group_name = var.dns_resource_group_name ttl = 3600 diff --git a/terraform/modules/dns/variables.tf b/terraform/modules/dns/variables.tf index 7e479bfb..0304c892 100644 --- a/terraform/modules/dns/variables.tf +++ b/terraform/modules/dns/variables.tf @@ -6,6 +6,10 @@ variable "dns_resource_group_name" { type = string } +variable "dns_prefix" { + type = string +} + variable "resource_group_name" { type = string }