jmeter-aci-terraform icon indicating copy to clipboard operation
jmeter-aci-terraform copied to clipboard

Terraform destroy isn't destroying ipConfiguration completely

Open willfell opened this issue 4 years ago • 1 comments

After running the pipeline over and over we get the following error upon terraform apply Error: Error Creating/Updating Virtual Network "<name-goes-here>" (Resource Group "<name-goes-here>"): network.VirtualNetworksClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InUseSubnetCannotBeDeleted" Message="Subnet <name-goes-here> is in use by /subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Network/networkProfiles/<net-profile>/containerNetworkInterfaceConfigurations/<name-goes-here>/ipConfigurations/<name-goes-here> and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet." Details=[]

Terraform destroy appears to destroy everything but somehow the ipConfigurations is staying but not showing in portal.

Has anybody else undergone this error?

willfell avatar Jul 09 '21 15:07 willfell

For some reason the network profile wasn't deleted. To fix it, try manually deleting it: https://docs.microsoft.com/en-us/answers/questions/119340/unable-to-delete-virtual-network.html

On the portal, try mark this checkbox: image

allantargino avatar Jul 11 '21 02:07 allantargino