4

I realize there probably isn't a single answer to this but I'm curious if there's any accepted best-practices or consensus on how resource groups and subscriptions should be organized.

Let's say you have a bunch of environments like dev, test, staging, and production. And your product is composed of N number of services, databases, and so on. Two thoughts come to mind:

  1. Subscription per environment: use a different subscription for every environment and create resource groups for different subsystems within the environment. The challenge I have with this is it's not always obvious how to organize things. Say you have two subsystems that communicate through a service bus. Which resource group does the service bus itself belong to? The increased granularity is a nice option but in practice for me rarely used.
  2. Resource group per environment: share the same subscription across all environments and use resource groups to group everything together. So you have a dev resource group, test resource group, and so on. This wouldn't give a ton of granularity but as I said that added granularity presents its own problems in my view.

Anyway, I'm just curious if there's any consensus or just thoughts on this. Cheers!

M Oak
  • 41
  • 1
  • 4
  • I think there should be more information as it will depend on a couple of scenarios. How are you looking a deploying (Powershell, ARM, portal)? How will security be handled (Subscription, resource group, both?) What type of resources are you looking to deploy (Network, VMs, Apps, Databases, blobs, etc...) – DreadedFrost Jan 08 '20 at 16:11

1 Answers1

2

There's no right or wrong for this. I personally organize using Resource Groups / Application Level

rg-dev-app-a rg-dev-app-b

rg-qa-app-a rg-qa-app-b

and so on. You can also work with tags, which helps when dealing with shared resources between environments (dev / qa) or apps.

You can also find useful information in here: https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging

PS: I don't work with different subscriptions because there's no easy way (without powershell) to move resources between subscriptions (if needed).

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90