From 9ec73401997c53cd4499b1c772b3e1369001490d Mon Sep 17 00:00:00 2001 From: Marvin Buss Date: Thu, 23 Dec 2021 10:35:43 +0100 Subject: [PATCH] Add Data Landing Zone Subs as Input --- .github/linters/.arm-ttk.psd1 | 2 +- docs/reference/dataManagementAnalytics.bicep | 3 + docs/reference/dataManagementAnalytics.json | 67 ++++++++++---------- 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/.github/linters/.arm-ttk.psd1 b/.github/linters/.arm-ttk.psd1 index 5616ed20..04d221c6 100644 --- a/.github/linters/.arm-ttk.psd1 +++ b/.github/linters/.arm-ttk.psd1 @@ -4,7 +4,7 @@ @{ # Test = @( ) Skip = @( - 'Template Should Not Contain Blanks', + 'Template Should Not Contain Blanks' 'DeploymentTemplate Must Not Contain Hardcoded Uri' 'DependsOn Best Practices' 'IDs Should Be Derived From ResourceIDs' diff --git a/docs/reference/dataManagementAnalytics.bicep b/docs/reference/dataManagementAnalytics.bicep index ebc65c39..7abe571a 100644 --- a/docs/reference/dataManagementAnalytics.bicep +++ b/docs/reference/dataManagementAnalytics.bicep @@ -207,6 +207,9 @@ resource dataLandingZoneDeployment 'Microsoft.Resources/deployments@2021-04-01' deploySelfHostedIntegrationRuntimes: { value: true } + dataLandingZoneSubscriptionIds: { + value: [ for item in dataLandingZoneDetails: item.subscription ] + } privateDnsZoneIdKeyVault: { value: reference(dataManagementZoneDeployment.name).outputs.privateDnsZoneIdKeyVault.value } diff --git a/docs/reference/dataManagementAnalytics.json b/docs/reference/dataManagementAnalytics.json index 39518acc..431bcaa9 100644 --- a/docs/reference/dataManagementAnalytics.json +++ b/docs/reference/dataManagementAnalytics.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "13247179156562340716" + "version": "0.4.1124.51302", + "templateHash": "3074724964256243104" } }, "parameters": { @@ -88,7 +88,6 @@ ] } }, - "functions": [], "variables": { "dataManagementZoneTemplateLink": "https://raw.githubusercontent.com/Azure/data-management-zone/main/infra/main.json", "dataLandingZoneTemplateLink": "https://raw.githubusercontent.com/Azure/data-landing-zone/main/infra/main.json" @@ -263,6 +262,15 @@ "deploySelfHostedIntegrationRuntimes": { "value": true }, + "dataLandingZoneSubscriptionIds": { + "copy": [ + { + "name": "value", + "count": "[length(parameters('dataLandingZoneDetails'))]", + "input": "[parameters('dataLandingZoneDetails')[copyIndex('value')].subscription]" + } + ] + }, "privateDnsZoneIdKeyVault": { "value": "[reference(format('dataManagementZoneDeployment-{0}', deployment().location)).outputs.privateDnsZoneIdKeyVault.value]" }, @@ -302,7 +310,7 @@ { "condition": "[parameters('enableBastionHostDeployment')]", "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-06-01", + "apiVersion": "2020-10-01", "name": "[format('bastionHostDeployment-{0}', deployment().location)]", "subscriptionId": "[parameters('dataLandingZoneDetails')[0].subscription]", "location": "[deployment().location]", @@ -358,8 +366,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "12653787604786881755" + "version": "0.4.1124.51302", + "templateHash": "5067044301937855137" } }, "parameters": { @@ -460,7 +468,6 @@ } } }, - "functions": [], "variables": { "name": "[toLower(format('{0}-{1}', parameters('prefix'), parameters('environment')))]", "tagsDefault": { @@ -486,7 +493,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-06-01", + "apiVersion": "2020-10-01", "name": "networkServices", "subscriptionId": "[variables('vnetSubscriptionId')]", "resourceGroup": "[variables('vnetResourceGroupName')]", @@ -527,8 +534,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "10187757659530357192" + "version": "0.4.1124.51302", + "templateHash": "8836199328749372338" } }, "parameters": { @@ -559,7 +566,6 @@ "type": "string" } }, - "functions": [], "resources": [ { "type": "Microsoft.Network/networkSecurityGroups", @@ -786,7 +792,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-06-01", + "apiVersion": "2020-10-01", "name": "bastionServices", "resourceGroup": "[format('{0}-bastion', variables('name'))]", "properties": { @@ -811,10 +817,10 @@ "value": "[parameters('virtualMachineImage')]" }, "bastionSubnetId": { - "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('vnetSubscriptionId'), variables('vnetResourceGroupName')), 'Microsoft.Resources/deployments', 'networkServices'), '2020-06-01').outputs.bastionSubnetId.value]" + "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('vnetSubscriptionId'), variables('vnetResourceGroupName')), 'Microsoft.Resources/deployments', 'networkServices'), '2020-10-01').outputs.bastionSubnetId.value]" }, "jumpboxSubnetId": { - "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('vnetSubscriptionId'), variables('vnetResourceGroupName')), 'Microsoft.Resources/deployments', 'networkServices'), '2020-06-01').outputs.jumpboxSubnetId.value]" + "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('vnetSubscriptionId'), variables('vnetResourceGroupName')), 'Microsoft.Resources/deployments', 'networkServices'), '2020-10-01').outputs.jumpboxSubnetId.value]" }, "administratorUsername": { "value": "[parameters('administratorUsername')]" @@ -829,8 +835,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "2672844143716454115" + "version": "0.4.1124.51302", + "templateHash": "5443161126409397717" } }, "parameters": { @@ -869,7 +875,6 @@ "type": "secureString" } }, - "functions": [], "variables": { "bastion001Name": "[format('{0}-bastion001', parameters('prefix'))]", "virtualMachine001Name": "[format('{0}-vm001', parameters('prefix'))]" @@ -877,7 +882,7 @@ "resources": [ { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-06-01", + "apiVersion": "2020-10-01", "name": "bastion001", "properties": { "expressionEvaluationOptions": { @@ -904,8 +909,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "9194233898920649047" + "version": "0.4.1124.51302", + "templateHash": "5304528866008257447" } }, "parameters": { @@ -922,7 +927,6 @@ "type": "string" } }, - "functions": [], "variables": { "publicIpName": "[format('{0}-pip', parameters('bastionName'))]" }, @@ -978,7 +982,7 @@ }, { "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-06-01", + "apiVersion": "2020-10-01", "name": "virtualMachine001", "properties": { "expressionEvaluationOptions": { @@ -1017,8 +1021,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "8684162141135901545" + "version": "0.4.1124.51302", + "templateHash": "7161877090365327851" } }, "parameters": { @@ -1054,7 +1058,6 @@ "type": "string" } }, - "functions": [], "variables": { "nicName": "[format('{0}-nic', parameters('virtualmachineName'))]", "diskName": "[format('{0}-disk', parameters('virtualmachineName'))]", @@ -1167,7 +1170,7 @@ "count": "[length(range(0, length(parameters('dataLandingZoneDetails'))))]" }, "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-06-01", + "apiVersion": "2020-10-01", "name": "[format('vnetPeeringDeployment-{0}-{1}', range(0, length(parameters('dataLandingZoneDetails')))[copyIndex()], deployment().location)]", "location": "[deployment().location]", "properties": { @@ -1195,8 +1198,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "1258334118365795592" + "version": "0.4.1124.51302", + "templateHash": "13977441074455205991" } }, "parameters": { @@ -1207,7 +1210,6 @@ "type": "array" } }, - "functions": [], "variables": { "sourceVnetSubscriptionId": "[split(parameters('sourceVnetId'), '/')[2]]", "sourceVnetResourceGroupName": "[split(parameters('sourceVnetId'), '/')[4]]" @@ -1219,7 +1221,7 @@ "count": "[length(parameters('destinationVnetIds'))]" }, "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-06-01", + "apiVersion": "2020-10-01", "name": "[format('vnetPeering{0}', copyIndex())]", "subscriptionId": "[variables('sourceVnetSubscriptionId')]", "resourceGroup": "[variables('sourceVnetResourceGroupName')]", @@ -1242,8 +1244,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.4.1008.15138", - "templateHash": "10472092457843784458" + "version": "0.4.1124.51302", + "templateHash": "9720784943349899862" } }, "parameters": { @@ -1254,7 +1256,6 @@ "type": "string" } }, - "functions": [], "variables": { "sourceVnetName": "[if(greaterOrEquals(length(split(parameters('sourceVnetId'), '/')), 9), last(split(parameters('sourceVnetId'), '/')), 'incorrectSegmentLength')]", "destinationVnetName": "[if(greaterOrEquals(length(split(parameters('destinationVnetId'), '/')), 9), last(split(parameters('destinationVnetId'), '/')), 'incorrectSegmentLength')]"