So, I've setup a lab environment in a azure resource group with a domain controller, sql-server and a web server. I would like to clone that whole resource group to a new one when needed and by stat I mean with everything intact. Is that possible?
Azure Resource Manager templates are a great place to start for teams that want to clone existing resource groups, which are sets of related Azure resources. Admins can repeatedly deploy templates and consistently build workflows via an API call or button-click in the Azure Portal.
You can move Azure resources to either another Azure subscription or another resource group under the same subscription. You can use the Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources. To learn more, see Move resources to a new resource group or subscription.
I don't know of anyway to do a direct copy, but you can export a JSON template from the portal or PowerShell that will come close to giving you something you can automate. I say "close" because the feature is still in preview and some resources can't be exported.
In portal.azure.com go to: Resource Groups > [your rg] > Settings > Export...
In PowerShell see:
Export-AzureRMResourceGroup
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With