The latest release of Azure PowerShell includes the new “Export-AzureRMResourceGroup” cmdlet. This cmdlet allows you to specify the name of a Resource Group and it will export the resources for that group into an ARM Template json file. This new cmdlet is part of the new Azure PowerShell release that was just released today!
Export-AzureRMResourceGroup -ResourceGroupName “MyResourceGroup”
When run, this cmdlet will export the full configurations of the specified Azure Resource Group to a json file. Combining this capability along with the Azure QuickStart Templates and you should have everything you need to start automating all your Azure Resource deployments with ARM Templates!
One thing that I found isn’t supported yet is Azure Service Bus. Although ARM Templates do support some of the features of Azure Service Bus, the Export-AzureRMResourceGroup cmdlet doesn’t support exporting Service Bus resources at the time of writing this. Hopefully it’ll come in a future release, but for now I have submitted the following ARM Templates to the Azure QuickStart Templates:
- Create a Service Bus Namespace ARM Template
- Create a Service Bus Namespace and Topic ARM Template
- Create a Service Bus Topic with Subscription ARM Template
Azure ARM Templates are the method of automating the configuration of both Azure and Azure Stack resources using an Infrastructure as Code approach. In the past the recommended method was to either use the PowerShell or Xplat-CLI, but going forward the recommended method of managing Azure and Azure Stack deployments is going to be ARM Templates. ARM Templates are easier to manage and offer a big improvement over procedural methods like PowerShell or Xplat-CLI for scripting entire deployments.
Export-AzureRmResourceGroup #AzureRM #PowerShell #ARMhttps://t.co/yjR5s4zgeB pic.twitter.com/rO28tGIQka
— Ben Gelens (@bgelens) March 30, 2016
Happy ARM Templating!