diff --git a/terraform/main.tf b/terraform/main.tf index a9d7cb13..2cac0fdb 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -107,7 +107,6 @@ module "dns" { dns_prefix = "preview" resource_group_name = azurerm_resource_group.imo_app.name container_app_id = module.frontend.container_app_id - frontend_outbound_ip_addresses = module.frontend.outbound_ip_addresses frontend_fqdn = module.frontend.fqdn custom_domain_verification_id = module.frontend.custom_domain_verification_id } diff --git a/terraform/modules/dns/frontend.tf b/terraform/modules/dns/frontend.tf index f87b84d2..8f109b91 100644 --- a/terraform/modules/dns/frontend.tf +++ b/terraform/modules/dns/frontend.tf @@ -1,11 +1,3 @@ -resource "azurerm_dns_a_record" "frontend" { - name = "@" - zone_name = var.dns_zone_name - resource_group_name = var.dns_resource_group_name - ttl = 3600 - records = var.frontend_outbound_ip_addresses -} - resource "azurerm_dns_cname_record" "frontend" { name = var.dns_prefix zone_name = var.dns_zone_name @@ -26,8 +18,9 @@ resource "azurerm_dns_txt_record" "frontend" { } resource "azurerm_container_app_custom_domain" "frontend" { - name = trimprefix(azurerm_dns_txt_record.frontend.fqdn, "asuid.") - container_app_id = var.container_app_id + name = trimprefix(azurerm_dns_txt_record.frontend.fqdn, "asuid.") + container_app_id = var.container_app_id + certificate_binding_type = "SniEnabled" lifecycle { ignore_changes = [certificate_binding_type, container_app_environment_certificate_id] diff --git a/terraform/modules/dns/variables.tf b/terraform/modules/dns/variables.tf index 32669067..0304c892 100644 --- a/terraform/modules/dns/variables.tf +++ b/terraform/modules/dns/variables.tf @@ -18,10 +18,6 @@ variable "container_app_id" { type = string } -variable "frontend_outbound_ip_addresses" { - type = list(string) -} - variable "frontend_fqdn" { type = string } diff --git a/terraform/modules/frontend/outputs.tf b/terraform/modules/frontend/outputs.tf index ba1faf4b..e1a54f87 100644 --- a/terraform/modules/frontend/outputs.tf +++ b/terraform/modules/frontend/outputs.tf @@ -2,10 +2,6 @@ output "container_app_id" { value = azurerm_container_app.frontend.id } -output "outbound_ip_addresses" { - value = azurerm_container_app.frontend.outbound_ip_addresses -} - output "fqdn" { value = azurerm_container_app.frontend.ingress[0].fqdn }