Is Azure Resource Group just a Logical Container?

I was always thinking about Azure Resource Groups as a Logical container for resources that helps in managing and organizing resources in Azure. But it appears that there are some limitations that I was not aware of.

Here is the official definition from Microsoft:

A resource group is a container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group. You decide how you want to allocate resources to resource groups based on what makes the most sense for your organization. Generally, add resources that share the same lifecycle to the same resource group so you can easily deploy, update, and delete them as a group.

However, recently I have faced a new error that I have never seen before: Code="BadRequest" Message="Requested features 'Dynamic SKU, Linux Worker' not available in resource group rg-my-resource-group. Please try using a different resource group or create a new one.

After some research, I found this:

In some cases, when trying to create a new hosting plan for your function app in an existing resource group you might receive one of the following errors …

The reason this happens is due to how function app and web app plans are mapped to different pools of resources when being created. Different SKUs require a different set of infrastructure capabilities. When you create an app in a resource group, that resource group is mapped and assigned to a specific pool of resources. If you try to create another plan in that resource group and the mapped pool does not have the required resources, this error occurs.

Conclusion

The Azure Resource Group can still be considered as a logical container. But now I should keep in mind that it is also mapped and assigned to a specific pool of physical resources. I’m not sure why Microsoft has this limitation. Maybe it is related to some legacy reasons or some technical limitations. But I will keep this in mind for my future projects.

Comments

comments powered by Disqus