Create JSON file from existing Resource Group in Azure

Create JSON file from existing Resource Group in Azure

Q. How do I create a JSON file from an existing Resource Group in Azure?

A. Behind the scenes, everything with Azure Resource Manager is stored as JSON however to actually create resources you can use the portal, PowerShell along with JSON templates. If you have created resources and want to export out the JSON that represents a Resource Group deployment (which can then be used to redeploy) this can be accomplished using PowerShell and the modern Azure portal.

To use PowerShell use:

Export-AzureRmResourceGroup -ResourceGroupName <name of resource group>

From the portal simply open up the Resource Group (Browse - Resource Groups - <Resource Group>) then select Automation script which will show the JSON for the entire content of the Resource Group including the option to download or add to your private library in Azure which can then be re-deployed at a later time.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish