diff --git a/terraform/main.tf b/terraform/main.tf index 65ea62d..2765b4e 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -30,7 +30,7 @@ data "azuread_user" "az_lab_admin" { locals { kv_secret_name = "azure-client-secret" - app_name = "${var.project_name}-app" + app_name = "${var.project_name}-app" } resource "azurerm_resource_group" "rg" { @@ -189,19 +189,19 @@ resource "azurerm_dns_txt_record" "domain_verification" { } resource "azurerm_dns_cname_record" "app_record" { - name = var.project_name - zone_name = var.dns_zone_name + name = var.project_name + zone_name = var.dns_zone_name resource_group_name = var.dns_zone_resource_group_name - ttl = 300 + ttl = 300 record = "${local.app_name}.${azurerm_container_app_environment.env.default_domain}" } resource "azurerm_container_app_custom_domain" "custom_domain" { - name = trimsuffix(trimprefix(azurerm_dns_txt_record.domain_verification.fqdn, "asuid."), ".") + name = trimsuffix(trimprefix(azurerm_dns_txt_record.domain_verification.fqdn, "asuid."), ".") container_app_id = azurerm_container_app.app.id lifecycle { - ignore_changes = [ certificate_binding_type, container_app_environment_certificate_id ] + ignore_changes = [certificate_binding_type, container_app_environment_certificate_id] } }