diff --git a/modules/event_hubs/namespaces/event_hub_namespaces.tf b/modules/event_hubs/namespaces/event_hub_namespaces.tf index e1b92ae4ba..20b6ee3788 100644 --- a/modules/event_hubs/namespaces/event_hub_namespaces.tf +++ b/modules/event_hubs/namespaces/event_hub_namespaces.tf @@ -34,7 +34,7 @@ resource "azurerm_eventhub_namespace" "evh" { trusted_service_access_enabled = try(network_rulesets.value.trusted_service_access_enabled, null) dynamic "virtual_network_rule" { - for_each = try(var.settings.network_rulesets.virtual_network_rule, {}) + for_each = try(network_rulesets.value.virtual_network_rule, {}) content { subnet_id = virtual_network_rule.value.subnet_id ignore_missing_virtual_network_service_endpoint = try(virtual_network_rule.value.ignore_missing_virtual_network_service_endpoint, null) @@ -42,7 +42,7 @@ resource "azurerm_eventhub_namespace" "evh" { } dynamic "ip_rule" { - for_each = try(var.settings.network_rulesets.ip_rule, {}) + for_each = try(network_rulesets.value.ip_rule, {}) content { ip_mask = ip_rule.value.ip_mask action = try(ip_rule.value.action, null)