From 0f3492824e4e3ea97136eaa2437ee2659a7964e1 Mon Sep 17 00:00:00 2001 From: tschwarz01 Date: Mon, 2 May 2022 13:46:58 -0500 Subject: [PATCH 1/2] Adds application_security_groups to resource templates --- .../resources/application_security_groups.tfvars.j2 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 templates/resources/application_security_groups.tfvars.j2 diff --git a/templates/resources/application_security_groups.tfvars.j2 b/templates/resources/application_security_groups.tfvars.j2 new file mode 100644 index 000000000..f3923af5a --- /dev/null +++ b/templates/resources/application_security_groups.tfvars.j2 @@ -0,0 +1,11 @@ +application_security_groups = { +{% for key, value in resources[tfstate_resource].resources[subscription_key].application_security_groups.items() %} + {{ key }} = { + name = "{{ value.name }}" + resource_group_key = "{{ value.resource_group_key }}" +{% if value.tags is defined %} + tags = "{{ value.tags }}" +{% endif %} + } +{% endfor %} +} From 9caa018b6be12564375287093b4025f881c9385a Mon Sep 17 00:00:00 2001 From: tschwarz01 Date: Wed, 4 May 2022 09:38:50 -0500 Subject: [PATCH 2/2] Fixes tags --- templates/resources/application_security_groups.tfvars.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/resources/application_security_groups.tfvars.j2 b/templates/resources/application_security_groups.tfvars.j2 index f3923af5a..9ff27c3a4 100644 --- a/templates/resources/application_security_groups.tfvars.j2 +++ b/templates/resources/application_security_groups.tfvars.j2 @@ -4,7 +4,11 @@ application_security_groups = { name = "{{ value.name }}" resource_group_key = "{{ value.resource_group_key }}" {% if value.tags is defined %} - tags = "{{ value.tags }}" + tags = { +{% for tag_key, tag_value in value.tags.items() %} + {{ tag_key }} = "{{ tag_value }}" +{% endfor %} + } {% endif %} } {% endfor %}