-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubnet.json
64 lines (64 loc) · 2.02 KB
/
subnet.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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "2017.09.01.0",
"parameters": {
"Name": {
"type": "string",
"metadata": {
"description": "The name of the resource that is unique within a resource group. This name can be used to access the resource."
}
},
"AddressPrefix": {
"type": "string",
"metadata": {
"description": "The address prefix for the subnet."
}
},
"NetworkSecurityGroupId": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The reference of the NetworkSecurityGroup resource."
}
},
"RouteTableId": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The reference of the RouteTable resource."
}
},
"ServiceEndpointId": {
"type": "array",
"defaultValue": [ ],
"metadata": {
"description": "An array of service endpoints."
}
}
},
"variables": {
"comment": {
"documentation": "https://docs.microsoft.com/en-us/rest/api/virtualnetwork/VirtualNetworks/CreateOrUpdate#definitions_subnet"
},
"NsgId": "[if(empty(parameters('NetworkSecurityGroupId')),json('null'),json(concat('{\"id\":','\"',parameters('NetworkSecurityGroupId'),'\"}')))]",
"RouteId": "[if(empty(parameters('RouteTableId')),json('null'),json(concat('{\"id\":','\"',parameters('RouteTableId'),'\"}')))]",
"SvcEndpointArray": "[if(empty(parameters('ServiceEndpointId')),json('null'),parameters('ServiceEndpointId'))]",
"subnet": {
"name": "[parameters('Name')]",
"properties": {
"addressPrefix": "[parameters('AddressPrefix')]",
"networkSecurityGroup": "[variables('NsgId')]",
"routeTable": "[variables('RouteId')]",
"serviceEndpoints": "[variables('SvcEndpointArray')]"
}
}
},
"resources": [
],
"outputs": {
"subnet": {
"type": "object",
"value": "[variables('subnet')]"
}
}
}