Windows Azure Platform Family of articles Catalog
The arm Template described earlier is used to edit the JSON file using a text editor.
Text describes how to use visual Studio to edit a JSON Template.
This article uses visual Studio with Update 3 for editing and installs Azure SDK 2.9.
If the reader is using Visual Studio 2013 and Azure SDK 2.9, the interface of the large department is similar to that of the author. I strongly recommend that you install the latest Visual Studio and Azure SDK.
Premise:
1. Install visual Studio with Update 3
2. Install Azure SDK 2.9
1. Run visual Studio with Update 3
2. Create an Azure Resource group project. Such as:
3. Templates Select Blank Template
4. After the project is created, does not contain any items, we select Templates, double-click Azuredeploy.json
5. Shown as JSON Outline, we can add new resource, click on resources, mail, add new Resource. Such as:
6. In the Popup interface, enter the storage account and then the yarn-dyed Storage account name (must be in lowercase English), such as:
7. Modify the Azuredeploy.json file in the Visual Studio project as follows:
{ "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentversion":"1.0.0.0", "Parameters": { "Leinewstoragetype": { "type":"string", "DefaultValue":"Standard_lrs", "allowedvalues": [ "Standard_lrs", "Standard_zrs", "Standard_grs", "Standard_ragrs", "Premium_lrs" ] }, "Storageaccounts_leistorageaccount_name": { "DefaultValue":"Leistorageaccount", "type":"String" } }, "variables": { }, "Resources": [ { "name":"[Parameters (' Storageaccounts_leistorageaccount_name ')]", "type":"microsoft.storage/storageaccounts", " Location":"[ResourceGroup (). Location]", "apiversion":"2015-06-15", "DependsOn": [], "Tags": { "DisplayName":"Leinewstorage" }, "Properties": { "AccountType":"[Parameters (' Leinewstoragetype ')]" } } ], "outputs": { }}
8. Modify the Azuredeploy.parameters.json file to read as follows:
{ "$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", "contentversion":"1.0.0.0", "Parameters": { "Storageaccounts_leistorageaccount_name": { "value":"Leinewstorageaccount" } }}
Finally, publish through Azure PowerShell with the following command:
# Sign InWrite-host"Logging in ..."; ADD-azurermaccount-environmentname Azurechinacloud;#Select SubscriptionWrite-host"Selecting Subscription ' $subscriptionId '"; Select-azurermsubscription-subscriptionid$subscriptionId;#Create resource GroupNew-azurermresourcegroup-name$resourceGroupName-location$resourceGroupLocation#Deploy templateNew-azurermresourcegroupdeployment-resourcegroupname"[Resourcegroupname]"-templatefile"[FilePath]"-templateparameterfile ["Parameterfilepath"];
Reference:https://azure.microsoft.com/en-us/documentation/articles/ vs-azure-tools-resource-groups-deployment-projects-create-deploy/
Azure Arm (7) Arm Template-Edit with Visual Studio