-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.json
187 lines (183 loc) · 5.8 KB
/
test.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualMachines_OVPN_name": {
"defaultValue": "OVPN",
"type": "String"
},
"networkInterfaces_OVPNVMNic_name": {
"defaultValue": "OVPNVMNic",
"type": "String"
},
"publicIPAddresses_OVPNPublicIP_name": {
"defaultValue": "OVPNPublicIP",
"type": "String"
},
"images_OVPN22_image_externalid": {
"defaultValue": "/subscriptions/dfc56fc5-6696-4c3c-ac3c-fce7c1c4fe46/resourceGroups/HE_IMAGES_RG/providers/Microsoft.Compute/images/OVPN22-image",
"type": "String"
},
"networkSecurityGroups_OpenVPNNetworkSecurityGroup_externalid": {
"defaultValue": "/subscriptions/dfc56fc5-6696-4c3c-ac3c-fce7c1c4fe46/resourceGroups/HE_IMAGES_RG/providers/Microsoft.Network/networkSecurityGroups/OpenVPNNetworkSecurityGroup",
"type": "String"
},
"openvpnusername": {
"defaultValue": "student",
"type": "String"
},
"openvpnuserpassword": {
"defaultValue": "Student00000",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2020-04-01",
"name": "[parameters('publicIPAddresses_OVPNPublicIP_name')]",
"location": "germanywestcentral",
"sku": {
"name": "Basic"
},
"properties": {
"ipAddress": "51.116.185.80",
"publicIPAddressVersion": "IPv4",
"publicIPAllocationMethod": "Dynamic",
"idleTimeoutInMinutes": 4,
"ipTags": []
}
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2019-07-01",
"name": "[parameters('virtualMachines_OVPN_name')]",
"location": "germanywestcentral",
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_OVPNVMNic_name'))]"
],
"plan": {
"name": "access_server_byol",
"product": "openvpnas",
"publisher": "openvpn"
},
"properties": {
"hardwareProfile": {
"vmSize": "Standard_DS1_v2"
},
"storageProfile": {
"imageReference": {
"id": "[parameters('images_OVPN22_image_externalid')]"
},
"osDisk": {
"osType": "Linux",
"name": "[concat(parameters('virtualMachines_OVPN_name'), '_disk1_5332c56df3554914978afeeca827a7a3')]",
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
},
"diskSizeGB": 30
},
"dataDisks": []
},
"osProfile": {
"computerName": "[parameters('virtualMachines_OVPN_name')]",
"adminUsername": "headmin",
"adminPassword": "2y=XRL*~iLtl",
"linuxConfiguration": {
"disablePasswordAuthentication": false,
"provisionVMAgent": true
},
"secrets": [],
"allowExtensionOperations": true
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_OVPNVMNic_name'))]"
}
]
}
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2020-04-01",
"name": "[parameters('networkInterfaces_OVPNVMNic_name')]",
"location": "germanywestcentral",
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_OVPNPublicIP_name'))]"
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfigOVPN",
"properties": {
"privateIPAddress": "10.1.0.4",
"privateIPAllocationMethod": "Static",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_OVPNPublicIP_name'))]"
},
"primary": true,
"privateIPAddressVersion": "IPv4"
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableAcceleratedNetworking": false,
"enableIPForwarding": false,
"networkSecurityGroup": {
"id": "[parameters('networkSecurityGroups_OpenVPNNetworkSecurityGroup_externalid')]"
}
}
},
{
"name": "microsoft.custom-script-linux-20200701124045",
"apiVersion": "2015-01-01",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "incremental",
"templateLink": {
"uri": "https://gallery.azure.com/artifact/20161101/microsoft.custom-script-linux-arm.2.0.56/Artifacts/MainTemplate.json"
},
"parameters": {
"vmName": {
"value": "OVPN"
},
"location": {
"value": "germanywestcentral"
},
"fileUris": {
"value": [
"https://hemainstorage.blob.core.windows.net/scripts/ovpn_change_ip.sh"
]
},
"commandToExecute": {
"value": "sh ovpn_change_ip.sh"
}
}
},
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachines_OVPN_name'))]"
]
}
],
"outputs": {
"openvpnusername": {
"type": "string",
"value": "[parameters('openvpnusername')]"
},
"openvpnuserpassword": {
"type": "string",
"value": "[parameters('openvpnuserpassword')]"
},
"openvpnpublicIPAddresses": {
"type": "string",
"value": "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachines_OVPN_name'))]"
}
}
}