-
Notifications
You must be signed in to change notification settings - Fork 850
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
Subnet previously used by deleted api management service cannot be deleted #2199
Comments
@promoisha is this something you can help with? |
I was hoping to finish the implementation for API Management in Terraform. Any more infomation on this issue? |
@jhendrixMSFT @promoisha Any update on this? |
This will be tracked in Azure/azure-rest-api-specs#4409. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm currently implementing support for the API Mangement service in Terraform and ran into an issue where our integration tests fail when trying to delete a subnet previously used by a deleted API Management service. (ref: hashicorp/terraform-provider-azurerm#1516)
The actual error :
autorest/azure: Service returned an error. Status=400 Code="InUseSubnetCannotBeDeleted" Message="Subnet testsubnet1 is in use by /subscriptions/0967fd64-a807-47e1-bf05-0e55e24a68d5/providers/Microsoft.ApiManagement/service?vnetResourceGuid=4b40d13c-b439-4ea8-b898-844b4413c252&subnet=testsubnet1&api-version=2016-07-07 and cannot be deleted." Details=[]
Note: We can eventually delete the subnet, but usually it takes close to an hour before we can do so.
Taking into account that it takes from 30-50 minutes to create the API Management service in Azure and only seconds to delete it, it would be safe to assume that the actual underlying Azure resources are still being deleted behind the scenes, after
ServiceClient.Delete()
has succeeded. It would also be natural to assume that these resources are the ones preventing the subnet to be deleted.What I would expect is that
ServiceClient.Delete()
would return aazure.Future
(instead ofautorest.Response
) and whereWaitForCompletion()
would succeed when all underlaying API Management resources are properly deleted, or at least detached from resources like subnet.The text was updated successfully, but these errors were encountered: