TonE
TonE

Reputation: 3035

Create automation script for existing Azure Resource Group and all contained Resources

I have an existing resource group containing a handful of resources created via the Azure Portal. I want to create the JSON template to allow a possible future deployment of an exact replica of the resource group and its contents.

I'm aware of the 'Automation' menu option for the Resource Group, however the resulting template doesn't capture the changes to configuration made after the creation of each resource. It also doesn't include some features (e.g. deployment slots).

Using the Azure Resource Explorer (https://resources.azure.com/) I can generate the complete and up-to-date JSON for each resource, but I can't see a way to recursively generate the JSON for the entire Resource Group.

Is there currently a means to do this?

Upvotes: 0

Views: 2511

Answers (1)

4c74356b41
4c74356b41

Reputation: 72171

No, this is not possible and there are properties that cannot be captured with rest api (from the top of my head - azure automation modules). I wouldn't rely on the approach you are advocating for.

The proper way would be to make changes to the arm template and deploy it. so do it the other way around, not the way you want it to be.

Upvotes: 2

Related Questions