sometime when you execute below command.
C:\Windows\System32\godevsuite137>az network vnet subnet update --resource-group rakResourceGroup --vnet-name rakVnet --name rakSubnet --address-prefix 10.20.2.0/24
you get error:-
(InUseSubnetCannotBeUpdated) Subnet rakSubnet is in use and cannot be updated.
Code: InUseSubnetCannotBeUpdated
Message: Subnet rakSubnet is in use and cannot be updated.
what is meaning of this error and how to check which all resources are associated with this subnet
This error message indicates that the subnet "rakSubnet" that you are trying to update is currently in use and cannot be updated. The error message is coming from the "InUseSubnetCannotBeUpdated" code, which indicates that the subnet is currently being used by one or more resources and cannot be modified.
This error occurs because the subnet you're trying to update is being used by some resources, such as a virtual machine, a load balancer or other resource which is connected to it. And those resources are actively using the subnet IP range, so it cannot be updated.
To resolve this error, you will need to identify the resources that are currently using the subnet, and either remove or move them to a different subnet before you can update the subnet CIDR.
You can use the command az network vnet subnet list --resource-group <resource_group> --vnet-name <vnet_name> to list the resources associated with the subnet.
Example:-
az network vnet subnet list --resource-group rakResourceGroup --vnet-name rakVnet
No comments:
Post a Comment