github.com/rahart/packer@v0.12.2-0.20161229105310-282bb6ad370f/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment07.approved.json (about)

     1  {
     2    "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
     3    "contentVersion": "1.0.0.0",
     4    "parameters": {
     5      "adminPassword": {
     6        "type": "string"
     7      },
     8      "adminUsername": {
     9        "type": "string"
    10      },
    11      "dnsNameForPublicIP": {
    12        "type": "string"
    13      },
    14      "osDiskName": {
    15        "type": "string"
    16      },
    17      "storageAccountBlobEndpoint": {
    18        "type": "string"
    19      },
    20      "vmName": {
    21        "type": "string"
    22      },
    23      "vmSize": {
    24        "type": "string"
    25      }
    26    },
    27    "resources": [
    28      {
    29        "apiVersion": "[variables('apiVersion')]",
    30        "location": "[variables('location')]",
    31        "name": "[variables('publicIPAddressName')]",
    32        "properties": {
    33          "dnsSettings": {
    34            "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
    35          },
    36          "publicIPAllocationMethod": "[variables('publicIPAddressType')]"
    37        },
    38        "type": "Microsoft.Network/publicIPAddresses"
    39      },
    40      {
    41        "apiVersion": "[variables('apiVersion')]",
    42        "location": "[variables('location')]",
    43        "name": "[variables('virtualNetworkName')]",
    44        "properties": {
    45          "addressSpace": {
    46            "addressPrefixes": [
    47              "[variables('addressPrefix')]"
    48            ]
    49          },
    50          "subnets": [
    51            {
    52              "name": "[variables('subnetName')]",
    53              "properties": {
    54                "addressPrefix": "[variables('subnetAddressPrefix')]"
    55              }
    56            }
    57          ]
    58        },
    59        "type": "Microsoft.Network/virtualNetworks"
    60      },
    61      {
    62        "apiVersion": "[variables('apiVersion')]",
    63        "dependsOn": [
    64          "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
    65          "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
    66        ],
    67        "location": "[variables('location')]",
    68        "name": "[variables('nicName')]",
    69        "properties": {
    70          "ipConfigurations": [
    71            {
    72              "name": "ipconfig",
    73              "properties": {
    74                "privateIPAllocationMethod": "Dynamic",
    75                "publicIPAddress": {
    76                  "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
    77                },
    78                "subnet": {
    79                  "id": "[variables('subnetRef')]"
    80                }
    81              }
    82            }
    83          ]
    84        },
    85        "type": "Microsoft.Network/networkInterfaces"
    86      },
    87      {
    88        "apiVersion": "[variables('apiVersion')]",
    89        "dependsOn": [
    90          "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
    91        ],
    92        "location": "[variables('location')]",
    93        "name": "[parameters('vmName')]",
    94        "properties": {
    95          "diagnosticsProfile": {
    96            "bootDiagnostics": {
    97              "enabled": false
    98            }
    99          },
   100          "hardwareProfile": {
   101            "vmSize": "[parameters('vmSize')]"
   102          },
   103          "networkProfile": {
   104            "networkInterfaces": [
   105              {
   106                "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
   107              }
   108            ]
   109          },
   110          "osProfile": {
   111            "adminPassword": "[parameters('adminPassword')]",
   112            "adminUsername": "[parameters('adminUsername')]",
   113            "computerName": "[parameters('vmName')]",
   114            "customData": "I2Nsb3VkLWNvbmZpZwpncm93cGFydDoKICBtb2RlOiBvZmYK",
   115            "linuxConfiguration": {
   116              "ssh": {
   117                "publicKeys": [
   118                  {
   119                    "keyData": "",
   120                    "path": "[variables('sshKeyPath')]"
   121                  }
   122                ]
   123              }
   124            }
   125          },
   126          "storageProfile": {
   127            "osDisk": {
   128              "caching": "ReadWrite",
   129              "createOption": "FromImage",
   130              "image": {
   131                "uri": "https://localhost/custom.vhd"
   132              },
   133              "name": "osdisk",
   134              "osType": "Linux",
   135              "vhd": {
   136                "uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
   137              }
   138            }
   139          }
   140        },
   141        "type": "Microsoft.Compute/virtualMachines"
   142      }
   143    ],
   144    "variables": {
   145      "addressPrefix": "10.0.0.0/16",
   146      "apiVersion": "2015-06-15",
   147      "location": "[resourceGroup().location]",
   148      "nicName": "packerNic",
   149      "publicIPAddressName": "packerPublicIP",
   150      "publicIPAddressType": "Dynamic",
   151      "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
   152      "subnetAddressPrefix": "10.0.0.0/24",
   153      "subnetName": "packerSubnet",
   154      "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
   155      "virtualNetworkName": "packerNetwork",
   156      "virtualNetworkResourceGroup": "[resourceGroup().name]",
   157      "vmStorageAccountContainerName": "images",
   158      "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
   159    }
   160  }