-
Notifications
You must be signed in to change notification settings - Fork 1
/
nested-inner-and-outer-scopes.json
105 lines (105 loc) · 3.88 KB
/
nested-inner-and-outer-scopes.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
// from https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/cross-resource-group-deployment?tabs=azure-powershell
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"variables": {
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"name": "defaultScopeTemplate",
"resourceGroup": "inlineGroup",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"variables": {
},
"resources": [
],
"outputs": {
"resourceGroupOutput": {
"type": "string",
"value": "[resourceGroup().name]"
}
}
},
"parameters": {
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"name": "innerScopeTemplate",
"resourceGroup": "inlineGroup",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"variables": {
},
"resources": [
],
"outputs": {
"resourceGroupOutput": {
"type": "string",
"value": "[resourceGroup().name]"
}
}
},
"parameters": {
}
}
},
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2017-05-10",
"name": "linkedTemplate",
"resourceGroup": "linkedGroup",
"properties": {
"mode": "Incremental",
"templateLink": {
"contentVersion": "1.0.0.0",
"uri": "https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/resourceGroupName.json"
},
"parameters": {
}
}
}
],
"outputs": {
"parentRG": {
"type": "string",
// "value": "Parent resource group is deleteme"
"value": "[concat('Parent resource group is ', resourceGroup().name)]"
},
"defaultScopeRG": {
"type": "string",
// "value": "Default scope resource group is deleteme"
"value": "[concat('Default scope resource group is ', reference('defaultScopeTemplate').outputs.resourceGroupOutput.value)]"
},
"innerScopeRG": {
"type": "string",
// "value": "Inner scope resource group is inlineGroup"
"value": "[concat('Inner scope resource group is ', reference('innerScopeTemplate').outputs.resourceGroupOutput.value)]"
},
"linkedRG": {
"type": "string",
// "value": "Linked resource group is linkedGroup"
"value": "[concat('Linked resource group is ', reference('linkedTemplate').outputs.resourceGroupOutput.value)]"
}
}
}