diff --git a/locals.tf b/locals.tf index 99b57c5b..47e1d436 100644 --- a/locals.tf +++ b/locals.tf @@ -53,7 +53,7 @@ locals { ) nsg = var.nsg_name == null ? azurerm_network_security_group.nsg[0] : data.azurerm_network_security_group.nsg[0] - nsg_rg_name = var.nsg_name == null ? local.aks_rg.name : local.network_rg.name + nsg_rg_name = local.network_rg.name # Use BYO UAI if given, else create a UAI aks_uai_id = (var.aks_identity == "uai" diff --git a/main.tf b/main.tf index 3fcc5166..2edc59e7 100644 --- a/main.tf +++ b/main.tf @@ -62,7 +62,7 @@ resource "azurerm_network_security_group" "nsg" { count = var.nsg_name == null ? 1 : 0 name = "${var.prefix}-nsg" location = var.location - resource_group_name = local.aks_rg.name + resource_group_name = local.network_rg.name tags = var.tags }