From 34773e1976283131995098414baebd8d8ce81d21 Mon Sep 17 00:00:00 2001 From: Ritika Patil <94649368+riragh@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:23:49 -0600 Subject: [PATCH] fix: (IAC-1321) updates to create NSG in network rg (#365) --- locals.tf | 2 +- main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }