From 80313057e5d2ffd99e20e3721f9b4115962d45b2 Mon Sep 17 00:00:00 2001 From: Darren Hull Date: Mon, 1 Jul 2024 16:42:42 +0100 Subject: [PATCH] fix ip_configuration iteration --- .../endpoints/private_endpoint/private_endpoint.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/networking/private_links/endpoints/private_endpoint/private_endpoint.tf b/modules/networking/private_links/endpoints/private_endpoint/private_endpoint.tf index 211c114ff1..da120c87eb 100644 --- a/modules/networking/private_links/endpoints/private_endpoint/private_endpoint.tf +++ b/modules/networking/private_links/endpoints/private_endpoint/private_endpoint.tf @@ -42,7 +42,7 @@ resource "azurerm_private_endpoint" "pep" { } } dynamic "ip_configuration" { - for_each = can(var.settings.ip_configuration) ? [var.settings.ip_configuration] : [] + for_each = { for key, value in try(local.compute.ip_configuration, {}) : key => value } content { name = ip_configuration.value.name private_ip_address = ip_configuration.value.private_ip_address