From 58194715e1800031b2c38b4de87b52ff398fbd0d Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Thu, 28 Nov 2024 10:49:16 +0000 Subject: [PATCH] fix(azure): make dns resource group optional --- azure-github/terraform/azure/cluster.tf | 2 +- azure-github/terraform/azure/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-github/terraform/azure/cluster.tf b/azure-github/terraform/azure/cluster.tf index ff3ec08e5..3cb8a5139 100644 --- a/azure-github/terraform/azure/cluster.tf +++ b/azure-github/terraform/azure/cluster.tf @@ -118,7 +118,7 @@ resource "kubernetes_secret_v1" "external_dns" { "azure.json" = jsonencode({ tenantId = data.azurerm_client_config.current.tenant_id subscriptionId = data.azurerm_client_config.current.subscription_id - resourceGroup = local.dns_zone_rg + resourceGroup = data.azurerm_dns_zone.external_dns[count.index].resource_group_name useManagedIdentityExtension = true userAssignedIdentityID = azurerm_kubernetes_cluster.kubefirst.kubelet_identity[0].client_id }) diff --git a/azure-github/terraform/azure/main.tf b/azure-github/terraform/azure/main.tf index 66a3dd6ff..7dabd6044 100644 --- a/azure-github/terraform/azure/main.tf +++ b/azure-github/terraform/azure/main.tf @@ -49,7 +49,7 @@ locals { kubefirst = "true" ProvisionedBy = "kubefirst" } - use_dns_zone = try(local.dns_zone != "" && local.dns_zone_rg != "", false) + use_dns_zone = try(local.dns_zone != "", false) vm_size = "" }