Stopping or Disabling a resource group in Azure

This does not seem to be possible at the moment but a request has been made here, however, no response from Microsoft on what it's status.

In general, if there are features that are not available in e.g. Azure, use the feedback site to suggest and vote on new features.

However, if you only got some specific type of resources in your resource group, like e.g. virtual machines, then you can stop them all in one PowerShell command like this:

Get-AzureRmResourceGroup <group name> | Stop-AzureRmVM -Force

Note: this approach is highly dependent on the type of resource and not a generic solutions like requested


A resource group is just a bounding-box, serving as a grouping mechanism and a security boundary. You cannot "stop" a resource group, as a resource group is never running. Yes, you can delete a resource group (along with everything in it), but that's a one-shot operation. It's not a fine-grained resource-management operation.

As for the services inside a resource group: some can be stopped, some cannot. For instance, you cannot stop a storage account. Others have very different behaviors when stopped: A VM simply sleeps/hibernates until restarted with everything preserved, while an HDInsight cluster, when stopped, deletes everything.

TL;DR there is currently no way to point to a resource group and have it stop all of its services, given the variability of behavior (and the fact there's no such supported API). You'll need to manage your resource starts/stops.

Tags:

Azure