github.com/mitchellh/packer@v1.3.2/builder/azure/common/template/template_builder_test.TestBuildLinux02.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      "nicName": {
    15        "type": "string"
    16      },
    17      "osDiskName": {
    18        "type": "string"
    19      },
    20      "publicIPAddressName": {
    21        "type": "string"
    22      },
    23      "storageAccountBlobEndpoint": {
    24        "type": "string"
    25      },
    26      "subnetName": {
    27        "type": "string"
    28      },
    29      "virtualNetworkName": {
    30        "type": "string"
    31      },
    32      "vmName": {
    33        "type": "string"
    34      },
    35      "vmSize": {
    36        "type": "string"
    37      }
    38    },
    39    "resources": [
    40      {
    41        "apiVersion": "[variables('networkInterfacesApiVersion')]",
    42        "dependsOn": [],
    43        "location": "[variables('location')]",
    44        "name": "[parameters('nicName')]",
    45        "properties": {
    46          "ipConfigurations": [
    47            {
    48              "name": "ipconfig",
    49              "properties": {
    50                "privateIPAllocationMethod": "Dynamic",
    51                "subnet": {
    52                  "id": "[variables('subnetRef')]"
    53                }
    54              }
    55            }
    56          ]
    57        },
    58        "type": "Microsoft.Network/networkInterfaces"
    59      },
    60      {
    61        "apiVersion": "[variables('apiVersion')]",
    62        "dependsOn": [
    63          "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]"
    64        ],
    65        "location": "[variables('location')]",
    66        "name": "[parameters('vmName')]",
    67        "properties": {
    68          "diagnosticsProfile": {
    69            "bootDiagnostics": {
    70              "enabled": false
    71            }
    72          },
    73          "hardwareProfile": {
    74            "vmSize": "[parameters('vmSize')]"
    75          },
    76          "networkProfile": {
    77            "networkInterfaces": [
    78              {
    79                "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]"
    80              }
    81            ]
    82          },
    83          "osProfile": {
    84            "adminPassword": "[parameters('adminPassword')]",
    85            "adminUsername": "[parameters('adminUsername')]",
    86            "computerName": "[parameters('vmName')]",
    87            "linuxConfiguration": {
    88              "ssh": {
    89                "publicKeys": [
    90                  {
    91                    "keyData": "--test-ssh-authorized-key--",
    92                    "path": "[variables('sshKeyPath')]"
    93                  }
    94                ]
    95              }
    96            }
    97          },
    98          "storageProfile": {
    99            "osDisk": {
   100              "caching": "ReadWrite",
   101              "createOption": "FromImage",
   102              "diskSizeGB": 100,
   103              "image": {
   104                "uri": "http://azure/custom.vhd"
   105              },
   106              "name": "[parameters('osDiskName')]",
   107              "osType": "Linux",
   108              "vhd": {
   109                "uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
   110              }
   111            }
   112          }
   113        },
   114        "type": "Microsoft.Compute/virtualMachines"
   115      }
   116    ],
   117    "variables": {
   118      "addressPrefix": "10.0.0.0/16",
   119      "apiVersion": "2017-03-30",
   120      "location": "[resourceGroup().location]",
   121      "managedDiskApiVersion": "2017-03-30",
   122      "networkInterfacesApiVersion": "2017-04-01",
   123      "publicIPAddressApiVersion": "2017-04-01",
   124      "publicIPAddressType": "Dynamic",
   125      "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
   126      "subnetAddressPrefix": "10.0.0.0/24",
   127      "subnetName": "--subnet-name--",
   128      "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
   129      "virtualNetworkName": "--virtual-network--",
   130      "virtualNetworkResourceGroup": "--virtual-network-resource-group--",
   131      "virtualNetworksApiVersion": "2017-04-01",
   132      "vmStorageAccountContainerName": "images",
   133      "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
   134    }
   135  }