github.com/marksheahan/packer@v0.10.2-0.20160613200515-1acb2d6645a0/builder/azure/common/template/TestBuildLinux01.approved.txt (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    "variables": {
    28      "addressPrefix": "10.0.0.0/16",
    29      "apiVersion": "2015-06-15",
    30      "location": "[resourceGroup().location]",
    31      "nicName": "packerNic",
    32      "publicIPAddressName": "packerPublicIP",
    33      "publicIPAddressType": "Dynamic",
    34      "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
    35      "subnetAddressPrefix": "10.0.0.0/24",
    36      "subnetName": "packerSubnet",
    37      "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
    38      "virtualNetworkName": "packerNetwork",
    39      "vmStorageAccountContainerName": "images",
    40      "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
    41    },
    42    "resources": [
    43      {
    44        "apiVersion": "[variables('apiVersion')]",
    45        "name": "[variables('publicIPAddressName')]",
    46        "type": "Microsoft.Network/publicIPAddresses",
    47        "location": "[variables('location')]",
    48        "properties": {
    49          "dnsSettings": {
    50            "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
    51          },
    52          "publicIPAllocationMethod": "[variables('publicIPAddressType')]"
    53        }
    54      },
    55      {
    56        "apiVersion": "[variables('apiVersion')]",
    57        "name": "[variables('virtualNetworkName')]",
    58        "type": "Microsoft.Network/virtualNetworks",
    59        "location": "[variables('location')]",
    60        "properties": {
    61          "addressSpace": {
    62            "addressPrefixes": [
    63              "[variables('addressPrefix')]"
    64            ]
    65          },
    66          "subnets": [
    67            {
    68              "properties": {
    69                "addressPrefix": "[variables('subnetAddressPrefix')]"
    70              },
    71              "name": "[variables('subnetName')]"
    72            }
    73          ]
    74        }
    75      },
    76      {
    77        "apiVersion": "[variables('apiVersion')]",
    78        "name": "[variables('nicName')]",
    79        "type": "Microsoft.Network/networkInterfaces",
    80        "location": "[variables('location')]",
    81        "dependsOn": [
    82          "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
    83          "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
    84        ],
    85        "properties": {
    86          "ipConfigurations": [
    87            {
    88              "properties": {
    89                "privateIPAllocationMethod": "Dynamic",
    90                "subnet": {
    91                  "id": "[variables('subnetRef')]"
    92                },
    93                "publicIPAddress": {
    94                  "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
    95                }
    96              },
    97              "name": "ipconfig"
    98            }
    99          ]
   100        }
   101      },
   102      {
   103        "apiVersion": "[variables('apiVersion')]",
   104        "name": "[parameters('vmName')]",
   105        "type": "Microsoft.Compute/virtualMachines",
   106        "location": "[variables('location')]",
   107        "dependsOn": [
   108          "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
   109        ],
   110        "properties": {
   111          "diagnosticsProfile": {
   112            "bootDiagnostics": {
   113              "enabled": false
   114            }
   115          },
   116          "hardwareProfile": {
   117            "vmSize": "[parameters('vmSize')]"
   118          },
   119          "networkProfile": {
   120            "networkInterfaces": [
   121              {
   122                "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
   123              }
   124            ]
   125          },
   126          "osProfile": {
   127            "computerName": "[parameters('vmName')]",
   128            "adminUsername": "[parameters('adminUsername')]",
   129            "adminPassword": "[parameters('adminPassword')]",
   130            "linuxConfiguration": {
   131              "ssh": {
   132                "publicKeys": [
   133                  {
   134                    "path": "[variables('sshKeyPath')]",
   135                    "keyData": "--test-ssh-authorized-key--"
   136                  }
   137                ]
   138              }
   139            }
   140          },
   141          "storageProfile": {
   142            "osDisk": {
   143              "osType": "Linux",
   144              "name": "osdisk",
   145              "vhd": {
   146                "uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
   147              },
   148              "image": {
   149                "uri": "http://azure/custom.vhd"
   150              },
   151              "caching": "ReadWrite",
   152              "createOption": "FromImage"
   153            }
   154          }
   155        }
   156      }
   157    ]
   158  }