github.phpd.cn/hashicorp/packer@v1.3.2/builder/azure/arm/template_factory_test.TestPlanInfo01.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('publicIPAddressApiVersion')]",
    42        "location": "[variables('location')]",
    43        "name": "[parameters('publicIPAddressName')]",
    44        "properties": {
    45          "dnsSettings": {
    46            "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
    47          },
    48          "publicIPAllocationMethod": "[variables('publicIPAddressType')]"
    49        },
    50        "tags": {
    51          "PlanInfo": "planName00",
    52          "PlanProduct": "planProduct00",
    53          "PlanPromotionCode": "",
    54          "PlanPublisher": "planPublisher00"
    55        },
    56        "type": "Microsoft.Network/publicIPAddresses"
    57      },
    58      {
    59        "apiVersion": "[variables('virtualNetworksApiVersion')]",
    60        "location": "[variables('location')]",
    61        "name": "[variables('virtualNetworkName')]",
    62        "properties": {
    63          "addressSpace": {
    64            "addressPrefixes": [
    65              "[variables('addressPrefix')]"
    66            ]
    67          },
    68          "subnets": [
    69            {
    70              "name": "[variables('subnetName')]",
    71              "properties": {
    72                "addressPrefix": "[variables('subnetAddressPrefix')]"
    73              }
    74            }
    75          ]
    76        },
    77        "tags": {
    78          "PlanInfo": "planName00",
    79          "PlanProduct": "planProduct00",
    80          "PlanPromotionCode": "",
    81          "PlanPublisher": "planPublisher00"
    82        },
    83        "type": "Microsoft.Network/virtualNetworks"
    84      },
    85      {
    86        "apiVersion": "[variables('networkInterfacesApiVersion')]",
    87        "dependsOn": [
    88          "[concat('Microsoft.Network/publicIPAddresses/', parameters('publicIPAddressName'))]",
    89          "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
    90        ],
    91        "location": "[variables('location')]",
    92        "name": "[parameters('nicName')]",
    93        "properties": {
    94          "ipConfigurations": [
    95            {
    96              "name": "ipconfig",
    97              "properties": {
    98                "privateIPAllocationMethod": "Dynamic",
    99                "publicIPAddress": {
   100                  "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddressName'))]"
   101                },
   102                "subnet": {
   103                  "id": "[variables('subnetRef')]"
   104                }
   105              }
   106            }
   107          ]
   108        },
   109        "tags": {
   110          "PlanInfo": "planName00",
   111          "PlanProduct": "planProduct00",
   112          "PlanPromotionCode": "",
   113          "PlanPublisher": "planPublisher00"
   114        },
   115        "type": "Microsoft.Network/networkInterfaces"
   116      },
   117      {
   118        "apiVersion": "[variables('apiVersion')]",
   119        "dependsOn": [
   120          "[concat('Microsoft.Network/networkInterfaces/', parameters('nicName'))]"
   121        ],
   122        "location": "[variables('location')]",
   123        "name": "[parameters('vmName')]",
   124        "plan": {
   125          "name": "planName00",
   126          "product": "planProduct00",
   127          "publisher": "planPublisher00"
   128        },
   129        "properties": {
   130          "diagnosticsProfile": {
   131            "bootDiagnostics": {
   132              "enabled": false
   133            }
   134          },
   135          "hardwareProfile": {
   136            "vmSize": "[parameters('vmSize')]"
   137          },
   138          "networkProfile": {
   139            "networkInterfaces": [
   140              {
   141                "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('nicName'))]"
   142              }
   143            ]
   144          },
   145          "osProfile": {
   146            "adminPassword": "[parameters('adminPassword')]",
   147            "adminUsername": "[parameters('adminUsername')]",
   148            "computerName": "[parameters('vmName')]",
   149            "linuxConfiguration": {
   150              "ssh": {
   151                "publicKeys": [
   152                  {
   153                    "keyData": "",
   154                    "path": "[variables('sshKeyPath')]"
   155                  }
   156                ]
   157              }
   158            }
   159          },
   160          "storageProfile": {
   161            "imageReference": {
   162              "offer": "ignored00",
   163              "publisher": "ignored00",
   164              "sku": "ignored00",
   165              "version": "latest"
   166            },
   167            "osDisk": {
   168              "caching": "ReadWrite",
   169              "createOption": "FromImage",
   170              "name": "[parameters('osDiskName')]",
   171              "vhd": {
   172                "uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
   173              }
   174            }
   175          }
   176        },
   177        "tags": {
   178          "PlanInfo": "planName00",
   179          "PlanProduct": "planProduct00",
   180          "PlanPromotionCode": "",
   181          "PlanPublisher": "planPublisher00"
   182        },
   183        "type": "Microsoft.Compute/virtualMachines"
   184      }
   185    ],
   186    "variables": {
   187      "addressPrefix": "10.0.0.0/16",
   188      "apiVersion": "2017-03-30",
   189      "location": "[resourceGroup().location]",
   190      "managedDiskApiVersion": "2017-03-30",
   191      "networkInterfacesApiVersion": "2017-04-01",
   192      "publicIPAddressApiVersion": "2017-04-01",
   193      "publicIPAddressType": "Dynamic",
   194      "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
   195      "subnetAddressPrefix": "10.0.0.0/24",
   196      "subnetName": "[parameters('subnetName')]",
   197      "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
   198      "virtualNetworkName": "[parameters('virtualNetworkName')]",
   199      "virtualNetworkResourceGroup": "[resourceGroup().name]",
   200      "virtualNetworksApiVersion": "2017-04-01",
   201      "vmStorageAccountContainerName": "images",
   202      "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
   203    }
   204  }