How to add a limit for the number of VMs that can be created in a specific resource group?

Sabrina 41 Reputation points
2021-11-01T19:10:53.63+00:00

Can I do this programmatically while creating the resource group?

Can I also limit the Size of the VM available to only be Standard_B1Is?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,750 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,120 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pradeep Kommaraju 2,546 Reputation points
    2021-11-01T22:53:08.333+00:00

    Hi @Sabrina

    Thank you for reaching out to Microsoft Q & A Platform

    The number of VM's per resource group parameter is fixed and cant be changed :
    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#virtual-machines-limits---azure-resource-manager

    You can try out creating Azure policy for the second use case of only creating certain types of VM's in a resource group .
    Ref: https://learn.microsoft.com/en-us/azure/governance/policy/tutorials/create-and-manage

    Request you to please accept the answer if this was helpful in implementing your use case .

    Thanks & Regards,
    Pradeep

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Sabrina 41 Reputation points
    2021-11-02T13:34:01.913+00:00

    @Pradeep Kommaraju , thanks for you response. What is the fixed number per resource group? Reading the chart, I see a number per subscription per region but not specifically a resource group.