|
5 | 5 | "clusterName": {
|
6 | 6 | "type": "String"
|
7 | 7 | },
|
| 8 | + "_artifactsLocation": { |
| 9 | + "type": "string", |
| 10 | + "defaultValue": "https://raw.githubusercontent.com/HelloTech/azure_patroni/master", |
| 11 | + "metadata": { |
| 12 | + "description": "Change this value to your repo name if deploying from a fork" |
| 13 | + } |
| 14 | + }, |
| 15 | + "vnetGroup": { |
| 16 | + "defaultValue": "", |
| 17 | + "type": "String", |
| 18 | + "metadata": { |
| 19 | + "description": "VNET Resource Group." |
| 20 | + } |
| 21 | + }, |
| 22 | + "newVnet": { |
| 23 | + "type": "string", |
| 24 | + "defaultValue": "yes", |
| 25 | + "allowedValues": [ |
| 26 | + "yes", |
| 27 | + "no" |
| 28 | + ], |
| 29 | + "metadata": { |
| 30 | + "description": "Would you like to create a new vnet?" |
| 31 | + } |
| 32 | + }, |
| 33 | + "lbType": { |
| 34 | + "type": "string", |
| 35 | + "defaultValue": "yes", |
| 36 | + "allowedValues": [ |
| 37 | + "yes", |
| 38 | + "no" |
| 39 | + ], |
| 40 | + "metadata": { |
| 41 | + "description": "Would you like to create an internal or external load balancer?" |
| 42 | + } |
| 43 | + }, |
| 44 | + "vnetName": { |
| 45 | + "defaultValue": "", |
| 46 | + "type": "String", |
| 47 | + "metadata": { |
| 48 | + "description": "Name of the vnet you would like to create, or that you would like to deploy this into." |
| 49 | + } |
| 50 | + }, |
| 51 | + "zookeeperNetName": { |
| 52 | + "defaultValue": "dcos-agentPublicSubnet", |
| 53 | + "type": "String", |
| 54 | + "metadata": { |
| 55 | + "description": "Name you would like to give to zookeeper's subnet." |
| 56 | + } |
| 57 | + }, |
| 58 | + "postgresNetName": { |
| 59 | + "defaultValue": "dcos-agentPublicSubnet", |
| 60 | + "type": "String", |
| 61 | + "metadata": { |
| 62 | + "description": "Name you would like to give to postgres' subnet." |
| 63 | + } |
| 64 | + }, |
8 | 65 | "instanceCount": {
|
9 | 66 | "defaultValue": 2,
|
10 | 67 | "minValue": 2,
|
|
30 | 87 | "s",
|
31 | 88 | "y"
|
32 | 89 | ],
|
| 90 | + "nestedTemplates": "[concat(parameters('_artifactsLocation'), '/nestedtemplates/']", |
33 | 91 | "storageAccountType": "Standard_LRS",
|
34 | 92 | "lbName": "postgresLoadBalancer",
|
| 93 | + "vnetFile": { |
| 94 | + "yes": "network-resources.json", |
| 95 | + "no": "empty-resources.json" |
| 96 | + }, |
35 | 97 | "lbId": "[resourceId('Microsoft.Network/loadBalancers/', variables('lbName'))]",
|
36 | 98 | "vnetName": "dcos-vnet-F0547AD4",
|
37 | 99 | "vnetGroup": "testht",
|
38 |
| - "vnetId": "[resourceId(variables('vnetGroup'), 'Microsoft.Network/virtualNetworks', variables('vnetName'))]", |
39 |
| - "zookeeperNetName": "dcos-agentPublicSubnet", |
| 100 | + "vnetId": "[resourceId(parameters('vnetGroup'), 'Microsoft.Network/virtualNetworks', parameters('vnetName'))]", |
40 | 101 | "zookeeperInstanceCount": 3,
|
41 |
| - "postgresNetName": "dcos-agentPublicSubnet", |
42 | 102 | "postgresInstanceCount": "[parameters('instanceCount')]",
|
43 | 103 | "osType": {
|
44 | 104 | "publisher": "Canonical",
|
|
48 | 108 | }
|
49 | 109 | },
|
50 | 110 | "resources": [
|
| 111 | + { |
| 112 | + "type": "Microsoft.Network/virtualNetworks", |
| 113 | + "name": "[variables('vnetName')]", |
| 114 | + "apiVersion": "2015-06-15", |
| 115 | + "properties": { |
| 116 | + "mode": "Incremental", |
| 117 | + "templateLink": { |
| 118 | + "uri": "[concat(variables('sharedTemplateFileName'), variables('vnetFile')[parameters('newVnet')])]", |
| 119 | + "contentVersion": "1.0.0.0" |
| 120 | + }, |
| 121 | + "parameters": { |
| 122 | + "vnetName": { |
| 123 | + "value": "[variables('vnetName')]" |
| 124 | + }, |
| 125 | + "zookeeperNetName": { |
| 126 | + "value": "[parameters('zookeeperNetName')]" |
| 127 | + }, |
| 128 | + "postgresNetName": { |
| 129 | + "value": "[parameters('postgresNetName')]" |
| 130 | + }, |
| 131 | + "clusterName": { |
| 132 | + "value": "[variables('clusterName')]" |
| 133 | + } |
| 134 | + } |
| 135 | + } |
| 136 | + }, |
51 | 137 | {
|
52 | 138 | "type": "Microsoft.Storage/storageAccounts",
|
53 | 139 | "name": "[concat(variables('storageAccountPrefix')[copyIndex()], variables('storageAccountSuffix'))]",
|
|
105 | 191 | "privateIPAllocationMethod": "Static",
|
106 | 192 | "privateIPAddress": "[concat('10.0.100.', copyIndex(10))]",
|
107 | 193 | "subnet": {
|
108 |
| - "id": "[concat(variables('vnetId'), '/subnets/', variables('zookeeperNetName'))]" |
| 194 | + "id": "[concat(variables('vnetId'), '/subnets/', parameters('zookeeperNetName'))]" |
109 | 195 | }
|
110 | 196 | }
|
111 | 197 | }
|
|
207 | 293 | "privateIPAllocationMethod": "Static",
|
208 | 294 | "privateIPAddress": "[concat('10.0.101.', copyIndex(10))]",
|
209 | 295 | "subnet": {
|
210 |
| - "id": "[concat(variables('vnetId'), '/subnets/', variables('postgresNetName'))]" |
| 296 | + "id": "[concat(variables('vnetId'), '/subnets/', parameters('postgresNetName'))]" |
211 | 297 | },
|
212 | 298 | "loadBalancerBackendAddressPools": [
|
213 | 299 | {
|
|
335 | 421 | "privateIPAddress": "10.0.101.4",
|
336 | 422 | "privateIPAllocationMethod": "Static",
|
337 | 423 | "subnet": {
|
338 |
| - "id": "[concat(variables('vnetId'), '/subnets/', variables('zookeeperNetName'))]" |
| 424 | + "id": "[concat(variables('vnetId'), '/subnets/', parameters('zookeeperNetName'))]" |
339 | 425 | }
|
340 | 426 | }
|
341 | 427 | }
|
|
0 commit comments