How to lock the Vnet peerings like we lock the the resources in resource group once after we create them?

Priyanka Varma 60 Reputation points
2024-03-27T04:26:00.8033333+00:00

To prevent unauthorized peerings to other Vnets after creation, it's essential to lock the peerings to restrict access for other users from creating unnecessary peerings. How to do that?
Can anyone help me out with this?

Thanks.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,498 questions
Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
828 questions
Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
913 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 46,771 Reputation points Microsoft Employee
    2024-03-27T05:14:42.94+00:00

    @Priyanka Varma ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to restrict users from creating unauthorized VNET Peerings.

    You can do this in a couple of ways:

    Use RBAC least privilege custom roles:

    Use VNET Read-only Lock:

    • To create or delete management locks, you need access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
    • Users assigned to the Owner and the User Access Administrator roles have the required access to create or delete the Lock of the VNET.
    • ReadOnly means authorized users can read a resource, but they can't delete or update it. Applying this lock is similar to restricting all authorized users to the permissions that the Reader role provides

    Please let us know if we can be of any further assistance here.

    Thanks,

    Kapil


    Please Accept an answer if correct.

    Original posters help the community find answers faster by identifying the correct answer.


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.