Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Terraform destroy isn't destroying ipConfiguration completely #69

Open
willfell opened this issue Jul 9, 2021 · 1 comment
Open

Terraform destroy isn't destroying ipConfiguration completely #69

willfell opened this issue Jul 9, 2021 · 1 comment

Comments

@willfell
Copy link

willfell commented Jul 9, 2021

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 willfell changed the title Terraform destroy portion isn't destroying everything properly Terraform destroy isn't destroying ipConfiguration completely Jul 9, 2021
@allantargino
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants