Azure-Samples / jmeter-aci-terraform

Scalable cloud load/stress testing pipeline solution with Apache JMeter and Terraform to dynamically provision and destroy the required infrastructure on Azure.
MIT License
119 stars 99 forks source link

Terraform destroy isn't destroying ipConfiguration completely #69

Open willfell opened 3 years ago

willfell commented 3 years ago

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?

allantargino commented 3 years ago

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