From 01685b8f5ef4ca981924567b81ad438405f78935 Mon Sep 17 00:00:00 2001 From: "Schirinzi, Francesco" Date: Tue, 11 Jul 2023 10:06:08 +0200 Subject: [PATCH 1/2] add ip_configuration block to private endpoints --- templates/resources/private_endpoints.tfvars.j2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/resources/private_endpoints.tfvars.j2 b/templates/resources/private_endpoints.tfvars.j2 index d7cf5f0e2..20ddfbcf8 100644 --- a/templates/resources/private_endpoints.tfvars.j2 +++ b/templates/resources/private_endpoints.tfvars.j2 @@ -32,6 +32,18 @@ private_endpoints = { keys = {{v.private_dns['keys'] | replace('None','[]') | replace('\'','\"') }} {% endif %} } +{% endif %} +{% if v.ip_configuration is defined %} + ip_configuration = { + name = "{{v.ip_configuration.name}}" + private_ip_address = "{{v.ip_configuration.private_ip_address}}" +{% if v.ip_configuration.subresource_name is defined %} + subresource_name = "{{v.ip_configuration.subresource_name }}" +{% endif %} +{% if v.ip_configuration.member_name is defined %} + member_name = "{{v.ip_configuration.member_name }}" +{% endif %} + } {% endif %} } {% endfor %} From 3587b7490390690ee797101ab50f709f216a69af Mon Sep 17 00:00:00 2001 From: "Schirinzi, Francesco" Date: Mon, 31 Jul 2023 09:19:49 +0200 Subject: [PATCH 2/2] private endpoint allow multi ip configuration --- .../resources/private_endpoints.tfvars.j2 | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/templates/resources/private_endpoints.tfvars.j2 b/templates/resources/private_endpoints.tfvars.j2 index 20ddfbcf8..3a35f2ff1 100644 --- a/templates/resources/private_endpoints.tfvars.j2 +++ b/templates/resources/private_endpoints.tfvars.j2 @@ -33,18 +33,24 @@ private_endpoints = { {% endif %} } {% endif %} -{% if v.ip_configuration is defined %} - ip_configuration = { - name = "{{v.ip_configuration.name}}" - private_ip_address = "{{v.ip_configuration.private_ip_address}}" -{% if v.ip_configuration.subresource_name is defined %} - subresource_name = "{{v.ip_configuration.subresource_name }}" -{% endif %} -{% if v.ip_configuration.member_name is defined %} - member_name = "{{v.ip_configuration.member_name }}" -{% endif %} + +{% if v.ip_configurations is defined %} + ip_configurations = { +{% for k, ip_configuration in v.ip_configurations.items() %} + {{ k }} = { + name = "{{ip_configuration.name}}" + private_ip_address = "{{ip_configuration.private_ip_address}}" +{% if ip_configuration.subresource_name is defined %} + subresource_name = "{{ip_configuration.subresource_name }}" +{% endif %} +{% if ip_configuration.member_name is defined %} + member_name = "{{ip_configuration.member_name }}" +{% endif %} + } +{% endfor %} } {% endif %} + } {% endfor %} }