Skip to content

Subscription level scope ARM template deployment

Notifications You must be signed in to change notification settings

msalemor/gorgarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Deploy a Subscription Scope Template in Azure using Go

This Go code deploys a Subscription scope ARM template. This kind of template can create a resource group as well as resources.

Requirements

  • Create a service principal and export it to a file using the Azure CLI (this can be done from the Cloud Shell in the portal)
az ad sp create-for-rbac --sdk-auth > azure.auth
  • Set the AZURE_AUTH_LOCATION session variable to the sp file
SET AZURE_AUTH_LOCATION=c:\go\azure.auth

or

export AZURE_AUTH_LOCATION=/user/home/go/azure.auth
  • Run the application
go run main.go

Reference

This code comes mainly from:

About

Subscription level scope ARM template deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages