Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
372 views
in Technique[技术] by (71.8m points)

Cannot delete Virtual network and Public IP address

I have been trying to remove (different methods Powershell, Azure CLI and Portal) the following resources in the last few weeks. unfortunately I get everytime the same error’s. see below.

Error when deleting Virtual Network:

{
  "error": {
    "code": "InUseSubnetCannotBeDeleted",
    "message": "Subnet AzureBastionSubnet is in use by /subscriptions/770a83ad-afc7-4c4e-af43-90345ba05b08/resourceGroups/armrg-0aa34742-cb28-46bc-ba1a-3e17c0b41709/providers/Microsoft.Network/networkInterfaces/|providers|Microsoft.Compute|virtualMachineScaleSets|BastionVMSS|virtualMachines|0|networkInterfaces|custnic/ipConfigurations/ipconfig and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.",
    "details": []
  }
}

Error when deleting Public IP address:

{
  "error": {
    "code": "PublicIPAddressCannotBeDeleted",
    "message": "Public IP address /subscriptions/9d9d8e9b-956e-40da-9421-87cc21f19260/resourceGroups/SEQURA_Test/providers/Microsoft.Network/publicIPAddresses/Test-VNet-ip can not be deleted since it is still allocated to resource /subscriptions/770a83ad-afc7-4c4e-af43-90345ba05b08/resourceGroups/armrg-0aa34742-cb28-46bc-ba1a-3e17c0b41709/providers/Microsoft.Network/loadBalancers/DeploymentLB/frontendIPConfigurations/loadBalancerFrontEnd. In order to delete the public IP, disassociate/detach the Public IP address from the resource.  To learn how to do this, see aka.ms/deletepublicip.",
    "details": []
  }
}
```
Can someone help to remove this resources? 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...