步骤 1 |
复制下面的示例中的文本。
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string",
"defaultValue": "ngfw",
"metadata": {
"description": "Name of the NGFW VM"
}
},
"vmManagedImageId": {
"type": "string",
"defaultValue": "/subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/images/myImage",
"metadata": {
"description": "The ID of the managed image used for deployment. /subscriptions/{subscription-id}/resourceGroups/myresourcegroup1/providers/Microsoft.Compute/images/myImage"
}
},
"adminUsername": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Username for the Virtual Machine. admin, Administrator among other values are disallowed - see Azure docs"
}
},
"adminPassword": {
"type": "securestring",
"defaultValue" : "",
"metadata": {
"description": "Password for the Virtual Machine. Passwords must be 12 to 72 chars and have at least 3 of the following: Lowercase, uppercase, numbers, special chars"
}
},
"vmStorageAccount": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "A storage account name (boot diags require a storage account). Between 3 and 24 characters. Lowercase letters and numbers only"
}
},
"virtualNetworkResourceGroup": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Name of the virtual network's Resource Group"
}
},
"virtualNetworkName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Name of the virtual network"
}
},
"mgmtSubnetName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The FTDv management interface will attach to this subnet"
}
},
"mgmtSubnetIP": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "NGFW IP on the mgmt interface (example: 192.168.0.10)"
}
},
"diagSubnetName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The FTDv diagnostic0/0 interface will attach to this subnet"
}
},
"diagSubnetIP": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "NGFW IP on the diag interface (example: 192.168.1.10)"
}
},
"gig00SubnetName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The FTDv Gigabit 0/0 interface will attach to this subnet"
}
},
"gig00SubnetIP": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The IP on the Gigabit 0/0 interface (example: 192.168.2.10)"
}
},
"gig01SubnetName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The FTDv Gigabit 0/1 interface will attach to this subnet"
}
},
"gig01SubnetIP": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The IP on the Gigabit 0/1 interface (example: 192.168.3.5)"
}
},
"VmSize": {
"type": "string",
"defaultValue": "Standard_D3_v2",
"allowedValues": [ "Standard_D3_v2" , "Standard_D3" ],
"metadata": {
"description": "NGFW VM Size (Standard_D3_v2 or Standard_D3)"
}
}
},
"variables": {
"virtualNetworkID": "[resourceId(parameters('virtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
"vmNic0Name":"[concat(parameters('vmName'),'-nic0')]",
"vmNic1Name":"[concat(parameters('vmName'),'-nic1')]",
"vmNic2Name":"[concat(parameters('vmName'),'-nic2')]",
"vmNic3Name":"[concat(parameters('vmName'),'-nic3')]",
"vmNic0NsgName":"[concat(variables('vmNic0Name'),'-NSG')]",
"vmMgmtPublicIPAddressName": "[concat(parameters('vmName'),'nic0-ip')]",
"vmMgmtPublicIPAddressType": "Static",
"vmMgmtPublicIPAddressDnsName": "[variables('vmMgmtPublicIPAddressName')]"
},
"resources": [
{
"apiVersion": "2017-03-01",
"type": "Microsoft.Network/publicIPAddresses",
"name": "[variables('vmMgmtPublicIPAddressName')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "[variables('vmMgmtPublicIpAddressType')]",
"dnsSettings": {
"domainNameLabel": "[variables('vmMgmtPublicIPAddressDnsName')]"
}
}
},
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "[variables('vmNic0NsgName')]",
"location": "[resourceGroup().location]",
"properties": {
"securityRules": [
{
"name": "SSH-Rule",
"properties": {
"description": "Allow SSH",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "22",
"sourceAddressPrefix": "Internet",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 100,
"direction": "Inbound"
}
},
{
"name": "SFtunnel-Rule",
"properties": {
"description": "Allow tcp 8305",
"protocol": "Tcp",
"sourcePortRange": "*",
"destinationPortRange": "8305",
"sourceAddressPrefix": "Internet",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 101,
"direction": "Inbound"
}
}
]
}
},
{
"apiVersion": "2017-03-01",
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('vmNic0Name')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/',variables('vmNic0NsgName'))]",
"[concat('Microsoft.Network/publicIPAddresses/', variables('vmMgmtPublicIPAddressName'))]"
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress" : "[parameters('mgmtSubnetIP')]",
"subnet": {
"id": "[concat(variables('virtualNetworkID'),'/subnets/', parameters('mgmtSubnetName'))]"
},
"publicIPAddress":{
"id": "[resourceId('Microsoft.Network/publicIPAddresses/', variables('vmMgmtPublicIPAddressName'))]"
}
}
}
],
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('vmNic0NsgName'))]"
},
"enableIPForwarding": true
}
},
{
"apiVersion": "2017-03-01",
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('vmNic1Name')]",
"location": "[resourceGroup().location]",
"dependsOn": [
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress" : "[parameters('diagSubnetIP')]",
"subnet": {
"id": "[concat(variables('virtualNetworkID'),'/subnets/', parameters('diagSubnetName'))]"
} }
}
],
"enableIPForwarding": true
}
},
{
"apiVersion": "2017-03-01",
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('vmNic2Name')]",
"location": "[resourceGroup().location]",
"dependsOn": [
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress" : "[parameters('gig00SubnetIP')]",
"subnet": {
"id": "[concat(variables('virtualNetworkID'),'/subnets/', parameters('gig00SubnetName'))]"
} }
}
],
"enableIPForwarding": true
}
},
{
"apiVersion": "2017-03-01",
"type": "Microsoft.Network/networkInterfaces",
"name": "[variables('vmNic3Name')]",
"location": "[resourceGroup().location]",
"dependsOn": [
],
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"privateIPAllocationMethod": "Static",
"privateIPAddress" : "[parameters('gig01SubnetIP')]",
"subnet": {
"id": "[concat(variables('virtualNetworkID'),'/subnets/', parameters('gig01SubnetName'))]"
} }
}
],
"enableIPForwarding": true
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[concat(parameters('vmStorageAccount'))]",
"apiVersion": "2015-06-15",
"location": "[resourceGroup().location]",
"properties": {
"accountType": "Standard_LRS"
}
},
{
"apiVersion": "2017-12-01",
"type": "Microsoft.Compute/virtualMachines",
"name": "[parameters('vmName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Storage/storageAccounts/', parameters('vmStorageAccount'))]",
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNic0Name'))]",
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNic1Name'))]",
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNic2Name'))]",
"[concat('Microsoft.Network/networkInterfaces/',variables('vmNic3Name'))]"
],
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('vmSize')]"
},
"osProfile": {
"computername": "[parameters('vmName')]",
"adminUsername": "[parameters('AdminUsername')]",
"adminPassword": "[parameters('AdminPassword')]"
},
"storageProfile": {
"imageReference": {
"id": "[parameters('vmManagedImageId')]"
},
"osDisk": {
"osType": "Linux",
"caching": "ReadWrite",
"createOption": "FromImage"
}
},
"networkProfile": {
"networkInterfaces": [
{
"properties": {
"primary": true
},
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNic0Name'))]"
},
{
"properties": {
"primary": false
},
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNic1Name'))]"
},
{
"properties": {
"primary": false
},
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNic2Name'))]"
},
{
"properties": {
"primary": false
},
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNic3Name'))]"
}
]
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[concat('http://',parameters('vmStorageAccount'),'.blob.core.windows.net')]"
}
}
}
}
],
"outputs": { }
}
|