简体   繁体   中英

Create resource group and deploy resources using Arm template and deploy from Visual Studio

I want to create resource group and deploy resource using ARM template from visual Studio

When I tried the following example by copying the script and put it in my Visual Studio. When I try to run the Deployment template comes out blank.

https://docs.microsoft.com/en-us/azure/azure-resource-manager/deploy-to-subscription#create-resource-group-and-deploy-resources 在此处输入图片说明

How do i run this the arm template?

Schema that is used in your example uses "subscription level schema"

https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#

As per https://docs.microsoft.com/en-us/azure/azure-resource-manager/deploy-to-subscription

To deploy templates at the subscription level, you use Azure CLI and Azure PowerShell.

I used this schema "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#" I used this default schema..and it detects that file as "deployment template"

Currently VS doesn't handle subscription level deployment templates. VS won't deploy them via the UI and if the schema is set properly it won't even recognize it as an ARM template.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM