From 5bc595a34b0b532735197348f82c7be086323ce4 Mon Sep 17 00:00:00 2001 From: Sacha Narinx Date: Wed, 18 Dec 2024 15:02:50 +0400 Subject: [PATCH] . --- .../avnmConfiguration.json | 46 +++++++++++++------ eslzArm/subscriptionTemplates/avnmPolicy.json | 2 +- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/eslzArm/subscriptionTemplates/avnmConfiguration.json b/eslzArm/subscriptionTemplates/avnmConfiguration.json index 9c901cbbb..1772e5e00 100644 --- a/eslzArm/subscriptionTemplates/avnmConfiguration.json +++ b/eslzArm/subscriptionTemplates/avnmConfiguration.json @@ -63,6 +63,9 @@ "location": { "value": "[parameters('location')]" }, + "locationSecondary": { + "value": "[parameters('locationSecondary')]" + }, "managementGroupScope": { "value": "[parameters('managementGroupScope')]" } @@ -74,6 +77,9 @@ "location": { "type": "string" }, + "locationSecondary": { + "type": "string" + }, "managementGroupScope": { "type": "string" } @@ -104,32 +110,42 @@ { "type": "Microsoft.Network/networkManagers/networkGroups", "apiVersion": "2024-03-01", - "name": "[format('{0}/{1}', 'avnm', 'ng-static')]", + "name": "[format('{0}/{1}', 'avnm', 'avnm-ng-all')]", "properties": { "memberType": "VirtualNetwork", - "description": "Network Group - Static" + "description": "Network Group - All Landing Zone virtual networks" }, "dependsOn": [ "[resourceId('Microsoft.Network/networkManagers', 'avnm')]" ], "metadata": { - "description": "This is the static network group for the spoke VNETs, and hub when topology is mesh." + "description": "This is the dynamic network group for all ALZ VNETs." } }, { "type": "Microsoft.Network/networkManagers/networkGroups", "apiVersion": "2024-03-01", - "name": "[format('{0}/{1}', 'avnm', 'ng-dynamic')]", + "name": "[format('{0}/{1}', 'avnm', format('avnm-ng-{0}', parameters('location')))]", "properties": { "memberType": "VirtualNetwork", - "description": "Network Group - Dynamic" + "description": "[format('Network Group - Region - {0}', parameters('location'))]" }, "dependsOn": [ "[resourceId('Microsoft.Network/networkManagers', 'avnm')]" - ], - "metadata": { - "description": "This is the dynamic network group for the spoke VNETs, and hub when topology is mesh." - } + ] + }, + { + "condition": "[not(empty(parameters('locationSecondary')))]", + "type": "Microsoft.Network/networkManagers/networkGroups", + "apiVersion": "2024-03-01", + "name": "[format('{0}/{1}', 'avnm', format('avnm-ng-{0}', parameters('locationSecondary')))]", + "properties": { + "memberType": "VirtualNetwork", + "description": "[format('Network Group - Region - {0}', parameters('locationSecondary'))]" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/networkManagers', 'avnm')]" + ] }, { "type": "Microsoft.Network/networkManagers/securityAdminConfigurations", @@ -148,16 +164,20 @@ "name": "[format('{0}/{1}/{2}', 'avnm', 'sac-alz', 'rc-ALZ')]", "dependsOn": [ "[resourceId('Microsoft.Network/networkManagers/securityAdminConfigurations', 'avnm', 'sac-alz')]", - "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', 'ng-static')]", - "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', 'ng-dynamic')]" + "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', 'avnm-ng-all')]", + "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', format('avnm-ng-{0}', parameters('location')))]", + "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', format('avnm-ng-{0}', parameters('locationSecondary')))]" ], "properties": { "appliesToGroups": [ { - "networkGroupId": "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', 'ng-static')]" + "networkGroupId": "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', 'avnm-ng-all')]" + }, + { + "networkGroupId": "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', format('avnm-ng-{0}', parameters('location')))]" }, { - "networkGroupId": "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', 'ng-dynamic')]" + "networkGroupId": "[resourceId('Microsoft.Network/networkManagers/networkGroups', 'avnm', format('avnm-ng-{0}', parameters('locationSecondary')))]" } ] diff --git a/eslzArm/subscriptionTemplates/avnmPolicy.json b/eslzArm/subscriptionTemplates/avnmPolicy.json index c01a3313c..3ecee00c4 100644 --- a/eslzArm/subscriptionTemplates/avnmPolicy.json +++ b/eslzArm/subscriptionTemplates/avnmPolicy.json @@ -25,7 +25,7 @@ } }, "variables": { - "networkGroupId": "[resourceId(parameters('connectivitySubscriptionId'), 'rg-alz-avnm', 'Microsoft.Network/networkManagers/networkGroups', 'avnm', 'ng-dynamic')]" + "networkGroupId": "[resourceId(parameters('connectivitySubscriptionId'), 'rg-alz-avnm', 'Microsoft.Network/networkManagers/networkGroups', 'avnm', 'avnm-ng-all')]" }, "resources": [ {