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