-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchildresources-nested.json
53 lines (53 loc) · 1.95 KB
/
childresources-nested.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
// https://github.com/neilpeterson/arm-template-collection/blob/master/3-other/resource-id-child-resources/azuredeploy-nested.json
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"functions": [
],
"variables": {
},
"resources": [
{
"name": "networkSecurityGroup1",
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2019-11-01",
"location": "[resourceGroup().location]",
"properties": {
},
"resources": [
{
"name": "networkSecurityGroupRuleName",
"type": "securityRules",
"apiVersion": "2019-11-01",
"dependson": [
"[resourceId('Microsoft.Network/networkSecurityGroups', 'networkSecurityGroup1')]"
],
"properties": {
"description": "nsgRuleDescription",
"protocol": "*",
"sourcePortRange": "*",
"destinationPortRange": "*",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 100,
"direction": "Inbound"
}
}
]
}
],
"outputs": {
"ruleResourceId": {
"type": "string",
"value": "[resourceId('Microsoft.Network/networkSecurityGroups/securityRules', 'networkSecurityGroup1', 'networkSecurityGroupRuleName')]"
},
// This does not work
"ruleResourceId2": {
"type": "string",
"value": "[resourceId('Microsoft.Network/networkSecurityGroups/securityRules', 'networkSecurityGroupRuleName')]"
}
}
}