Error in creating multiple NSGs using single terraform module

I have created a terraform module for creating multiple NSGs. I am getting the below error while implementing it. main.tf data “azurerm_resource_group” “rg” { name = var.resource_group_name } resource “azurerm_network_security_group” “nsg” { for_each = var.nsgs name = each.key resource_group_name = data.azurerm_resource_group.rg.name location = data.azurerm_resource_group.rg.location } resource “azurerm_network_security_rule” “custom_rules” { for_each = local.custom_rules name = each.value.name … Read more