Forum Discussion

madenu's avatar
madenu
Copper Contributor
Jul 24, 2023

How to see what resources use a subnet

Hi,

I want to move an ACR from one resource group to another but am met with an error:

Move operation blocked for resource /Microsoft.ContainerRegistry/registries/xyz123
  as it has enabled network rules. Please delete network rules before proceeding.
  (Code: MoveBlockedForRegistryWithNetworkRules, Target:
  Microsoft.ContainerRegistry/registries)",
  "code":"ResourceMoveProviderValidationFailed"...

 

This was deployed by an ARM template that defines a networkRuleSet for the resource. We're using version 2019-12-01-preview (https://learn.microsoft.com/en-us/azure/templates/microsoft.containerregistry/2019-12-01-preview/registries?pivots=deployment-language-arm-template).

I have a feeling the network rules referred to are the virtualNetworkRules in the template. I don't think we need these, but how do I verify that?

Right now there is only one virtualNetworkRule that allows access from a specific subnet. My question is, how do I see which resources are using that subnet? I wanted to check this before trying to remove the rule.

Resources