-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In order to delete the public IP, disassociate/detach the Public IP address from the resource. #107
Comments
Terraform version 0.12.5 I created an Azure kubernetes cluster and public IP for it with depends_on of the public IP pointing at the Azure kubernetes cluster resource. Removing the depends_on statement in the public IP definition alleviated this issue and allowed me to destroy both resources (Azure kubernetes cluster and public IP address). I need to run |
Same issue here (Azure kubernetes cluster resource). I don't have an implicit depends_on (the depends is through output variables on module definitions), but the issue is the same. Cheers |
Have same issue with Terraform v0.12.15 and terraform-provider-azurerm_v1.36.1_x4
retry finishes with success |
same issue on the azure firewall |
This also happens with terraform 0.12.23 and provider.azurerm v1.44.0 and repeating the destroy operation does not work. |
Actually, not tested well, but it worked for the last 2 builds. We had the same issue with aks and public ip used for ingress in our automated apply/destroy test workflow. Because public ip must be in the same resource group like aks nodes (which is created by aks on the fly and can't be created through terraform), we are forced to have In our observation the second run of |
Would this be the same issue?: hashicorp/terraform#25993 |
I get this error with a Public IP associated with a Gateway. Looks like there are several steps involved: "You would have to use PowerShell for that. This support is not available in portal. You will have to delete Rules, Listener (Remove-AzureRmApplicationGatewayRequestRoutingRule, Remove-AzureRmApplicationGatewayHttpListener in this order), which are associated with the frontend IP configuration and finally issue Remove-AzureRmApplicationGatewayFrontendIPConfig followed by Set-AzureRmApplicationGateway to achieve this." |
The nuclear option is to just tell terraform to replace the resource that is attached to the public IP: terraform apply -replace=azurerm_application_gateway.foo |
…lic ip's deletion.
Solve #107 by adding `create_before_destroy = true` to defer public ip's deletion.
Hello, EDIT: A new design with a attachment resource similar to disks would be a more robust solution |
Bug description: i create infrastructure, with public ip, now i want to remove public ip
when I change the value nb_public_ip = 1 to 0, I get this error:
Error: Error deleting Public IP "myvm-0-publicIP" (Resource Group "studytask"): network.PublicIPAddressesClient#Delete: Failure sending request: StatusCode=400 -- Original Error: Code="PublicIPAddressCannotBeDeleted" Message="Public IP address /subscriptions/ecfde0ed-ec43-4761-a254-c9bff2890753/resourceGroups/studytask/providers/Microsoft.Network/publicIPAddresses/myvm-0-publicIP can not be deleted since it is still allocated to resource /subscriptions/ecfde0ed-ec43-4761-a254-c9bff2890753/resourceGroups/studytask/providers/Microsoft.Network/networkInterfaces/nic-myvm-0/ipConfigurations/ipconfig0. 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=[]
Steps to reproduce:
The text was updated successfully, but these errors were encountered: