mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
232 lines
6.5 KiB
JSON
232 lines
6.5 KiB
JSON
{
|
|
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"networkInterfaceName1": {
|
|
"type": "string"
|
|
},
|
|
"networkSecurityGroupName": {
|
|
"type": "string"
|
|
},
|
|
"networkSecurityGroupRules": {
|
|
"type": "array"
|
|
},
|
|
"subnetName": {
|
|
"type": "string"
|
|
},
|
|
"virtualNetworkName": {
|
|
"type": "string"
|
|
},
|
|
"addressPrefixes": {
|
|
"type": "array"
|
|
},
|
|
"subnets": {
|
|
"type": "array"
|
|
},
|
|
"publicIpAddressName1": {
|
|
"type": "string"
|
|
},
|
|
"publicIpAddressType": {
|
|
"type": "string"
|
|
},
|
|
"publicIpAddressSku": {
|
|
"type": "string"
|
|
},
|
|
"pipDeleteOption": {
|
|
"type": "string"
|
|
},
|
|
"virtualMachineName": {
|
|
"type": "string"
|
|
},
|
|
"virtualMachineName1": {
|
|
"type": "string"
|
|
},
|
|
"virtualMachineComputerName1": {
|
|
"type": "string"
|
|
},
|
|
"virtualMachineRG": {
|
|
"type": "string"
|
|
},
|
|
"osDiskType": {
|
|
"type": "string"
|
|
},
|
|
"osDiskDeleteOption": {
|
|
"type": "string"
|
|
},
|
|
"virtualMachineSize": {
|
|
"type": "string"
|
|
},
|
|
"nicDeleteOption": {
|
|
"type": "string"
|
|
},
|
|
"hibernationEnabled": {
|
|
"type": "bool"
|
|
},
|
|
"adminUsername": {
|
|
"type": "string"
|
|
},
|
|
"securityType": {
|
|
"type": "string"
|
|
},
|
|
"secureBoot": {
|
|
"type": "bool"
|
|
},
|
|
"vTPM": {
|
|
"type": "bool"
|
|
},
|
|
"virtualMachine1Zone": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"variables": {
|
|
"nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]",
|
|
"vnetName": "[parameters('virtualNetworkName')]",
|
|
"vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
|
|
"subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]"
|
|
},
|
|
"resources": [
|
|
{
|
|
"name": "[parameters('networkInterfaceName1')]",
|
|
"type": "Microsoft.Network/networkInterfaces",
|
|
"apiVersion": "2022-11-01",
|
|
"location": "[parameters('location')]",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]",
|
|
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
|
|
"[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName1'))]"
|
|
],
|
|
"properties": {
|
|
"ipConfigurations": [
|
|
{
|
|
"name": "ipconfig1",
|
|
"properties": {
|
|
"subnet": {
|
|
"id": "[variables('subnetRef')]"
|
|
},
|
|
"privateIPAllocationMethod": "Dynamic",
|
|
"publicIpAddress": {
|
|
"id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName1'))]",
|
|
"properties": {
|
|
"deleteOption": "[parameters('pipDeleteOption')]"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"networkSecurityGroup": {
|
|
"id": "[variables('nsgId')]"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "[parameters('networkSecurityGroupName')]",
|
|
"type": "Microsoft.Network/networkSecurityGroups",
|
|
"apiVersion": "2020-05-01",
|
|
"location": "[parameters('location')]",
|
|
"properties": {
|
|
"securityRules": "[parameters('networkSecurityGroupRules')]"
|
|
}
|
|
},
|
|
{
|
|
"name": "[parameters('virtualNetworkName')]",
|
|
"type": "Microsoft.Network/virtualNetworks",
|
|
"apiVersion": "2023-02-01",
|
|
"location": "[parameters('location')]",
|
|
"properties": {
|
|
"addressSpace": {
|
|
"addressPrefixes": "[parameters('addressPrefixes')]"
|
|
},
|
|
"subnets": "[parameters('subnets')]"
|
|
}
|
|
},
|
|
{
|
|
"name": "[parameters('publicIpAddressName1')]",
|
|
"type": "Microsoft.Network/publicIpAddresses",
|
|
"apiVersion": "2020-08-01",
|
|
"location": "[parameters('location')]",
|
|
"properties": {
|
|
"publicIpAllocationMethod": "[parameters('publicIpAddressType')]"
|
|
},
|
|
"sku": {
|
|
"name": "[parameters('publicIpAddressSku')]"
|
|
},
|
|
"zones": ["[parameters('virtualMachine1Zone')]"]
|
|
},
|
|
{
|
|
"name": "[parameters('virtualMachineName1')]",
|
|
"type": "Microsoft.Compute/virtualMachines",
|
|
"apiVersion": "2024-03-01",
|
|
"location": "[parameters('location')]",
|
|
"dependsOn": [
|
|
"[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName1'))]"
|
|
],
|
|
"properties": {
|
|
"hardwareProfile": {
|
|
"vmSize": "[parameters('virtualMachineSize')]"
|
|
},
|
|
"storageProfile": {
|
|
"osDisk": {
|
|
"createOption": "fromImage",
|
|
"managedDisk": {
|
|
"storageAccountType": "[parameters('osDiskType')]"
|
|
},
|
|
"deleteOption": "[parameters('osDiskDeleteOption')]"
|
|
},
|
|
"imageReference": {
|
|
"publisher": "bunkerity",
|
|
"offer": "bunkerweb",
|
|
"sku": "bunkerweb",
|
|
"version": "latest"
|
|
}
|
|
},
|
|
"networkProfile": {
|
|
"networkInterfaces": [
|
|
{
|
|
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName1'))]",
|
|
"properties": {
|
|
"deleteOption": "[parameters('nicDeleteOption')]"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"additionalCapabilities": {
|
|
"hibernationEnabled": false
|
|
},
|
|
"osProfile": {
|
|
"computerName": "[parameters('virtualMachineComputerName1')]",
|
|
"adminUsername": "[parameters('adminUsername')]",
|
|
"linuxConfiguration": {
|
|
"disablePasswordAuthentication": true
|
|
}
|
|
},
|
|
"securityProfile": {
|
|
"securityType": "[parameters('securityType')]",
|
|
"uefiSettings": {
|
|
"secureBootEnabled": "[parameters('secureBoot')]",
|
|
"vTpmEnabled": "[parameters('vTPM')]"
|
|
}
|
|
},
|
|
"diagnosticsProfile": {
|
|
"bootDiagnostics": {
|
|
"enabled": true
|
|
}
|
|
}
|
|
},
|
|
"plan": {
|
|
"name": "bunkerweb",
|
|
"publisher": "bunkerity",
|
|
"product": "bunkerweb"
|
|
},
|
|
"zones": ["[parameters('virtualMachine1Zone')]"]
|
|
}
|
|
],
|
|
"outputs": {
|
|
"adminUsername": {
|
|
"type": "string",
|
|
"value": "[parameters('adminUsername')]"
|
|
}
|
|
}
|
|
}
|