https://github.com/chgeuer/td/blob/master/ARM/azuredeploy.json#L28-L35
"parameters": {
"deployVPN": {
"type": "string",
"defaultValue": "enabled",
"allowedValues": [
"enabled",
"disabled"
]
},
https://github.com/chgeuer/td/blob/master/ARM/azuredeploy.json#L117
"variables": {
"commonSettings": {
"deployVPN": "[parameters('deployVPN')]",
https://github.com/chgeuer/td/blob/master/ARM/azuredeploy.json#L237-L256
"resources": [
{
"name": "vpn,
"type": "Microsoft.Resources/deployments",
"apiVersion": "[variables('commonSettings').constants.apiVersions.deployments]",
"dependsOn": [
"[concat('Microsoft.Resources/deployments/', 'shared-resources')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[concat(variables('commonSettings').repositoryUrl, 'ARM/', concat('deployVPN-', parameters('deployRegServer'), '.json'))]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"commonSettings": {
"value": "[variables('commonSettings')]"
}
}
}
},
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { "commonSettings": { "type": "object" } },
"resources": [ ]
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { "commonSettings": { "type": "object" } },
"resources": [
{
"type": "Microsoft.Network/virtualNetworkGateways",
"name": "[concat(parameters('commonSettings').names.tenantName, '-vpn')]",
"apiVersion": "parameters('commonSettings').apiVersions.virtualNetworkGateways",
"properties": {
"ipConfigurations": [
{
"name": "...",
"properties": {
"subnet": {
"id": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/virtualNetworks/', 'vnetname', '/subnets/', 'subnet-vpn')]",
},
}
]
}