简体   繁体   中英

Azure ARM Template Deployment Without Template Linking

I'm having trouble finding documentation (although there seems to be hints) on how to deploy AzRM templates in a .Net application using Azure.Resource.Manager without requiring the use of Template Links. I want to generate templates on the fly and deploy from an in-memory template and parameters file, is this possible?

The easiest way to do this would be to call into the Azure powershell. Then you can just write your ARM template to a file, and deploy that file with:

Switch-AzureMode -Name AzureResourceManager    
New-AzureResourceGroup -name <resource group name> -Location 'westus' -TemplateFile <json file location>

To do the auth use Add-AzureAccount and switch to the sub that you want to use with Select-AzureSubscription .

To call that cmdlet unattended see: auto login Azure powershell

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