Is it possible that a Inherit Policy & Require Tag blocks Resource Group creation inside a resource creation blade ?

Antoine PERRENOUD 20 Reputation points
2023-04-05T09:59:13.8233333+00:00

I created two Policies : one that requires a resource to have tags related to environment & owner and the second that requires that resources inherit these tags from parent resource group.
Althgough, since it is not possible to assign tags when creating resource group within a resource creation blade, it blocks the creation every single time. Is there somethin I could do to prevent this behavior ? Or do I have to create resource group before the resource itself ? Thanks !

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
1,019 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tech-Hyd-1989 5,816 Reputation points
    2023-04-05T10:10:17.2933333+00:00

    Hello Antoine PERRENOUD If you have policies that require resources to have specific tags related to the environment and owner, and another policy that requires resources to inherit these tags from their parent resource group, it is best practice to create the resource group first, before creating any resources that will be associated with it. This will ensure that the resource group has the required tags, and that any resources created within it will inherit those tags automatically. In Azure, when you create a resource group, you can assign tags to it. These tags will then be inherited by any resources that are created within that resource group. Once you have created the resource group with the required tags, you can then create resources within it and the resources will automatically inherit the tags from the parent resource group. If you try to create a resource before creating the associated resource group, and that resource has policies that require it to have tags related to environment and owner, the creation process will fail because the resource does not have any parent resource group tags to inherit. To avoid this behavior, you should create the resource group first and assign any required tags to it. Then, when you create your resources, they will automatically inherit the tags from the parent resource group, and any additional tags that are required by your policy can be applied at the resource level. If you have already created resources that are failing the policy check, you will need to either update the resource to add the required tags, or recreate the resource within the appropriate resource group.

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.