{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/2199","repository_url":"https://api.github.com/repos/Azure/azure-sdk-for-go","labels_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/2199/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/2199/comments","events_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/2199/events","html_url":"https://github.com/Azure/azure-sdk-for-go/issues/2199","id":339509551,"node_id":"MDU6SXNzdWUzMzk1MDk1NTE=","number":2199,"title":"Subnet previously used by deleted api management service cannot be deleted","user":{"login":"torresdal","id":1205126,"node_id":"MDQ6VXNlcjEyMDUxMjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1205126?v=4","gravatar_id":"","url":"https://api.github.com/users/torresdal","html_url":"https://github.com/torresdal","followers_url":"https://api.github.com/users/torresdal/followers","following_url":"https://api.github.com/users/torresdal/following{/other_user}","gists_url":"https://api.github.com/users/torresdal/gists{/gist_id}","starred_url":"https://api.github.com/users/torresdal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torresdal/subscriptions","organizations_url":"https://api.github.com/users/torresdal/orgs","repos_url":"https://api.github.com/users/torresdal/repos","events_url":"https://api.github.com/users/torresdal/events{/privacy}","received_events_url":"https://api.github.com/users/torresdal/received_events","type":"User","site_admin":false},"labels":[{"id":948502120,"node_id":"MDU6TGFiZWw5NDg1MDIxMjA=","url":"https://api.github.com/repos/Azure/azure-sdk-for-go/labels/Sprint-121","name":"Sprint-121","color":"d4c5f9","default":false},{"id":1006963949,"node_id":"MDU6TGFiZWwxMDA2OTYzOTQ5","url":"https://api.github.com/repos/Azure/azure-sdk-for-go/labels/Sprint-122","name":"Sprint-122","color":"d4c5f9","default":false},{"id":948496345,"node_id":"MDU6TGFiZWw5NDg0OTYzNDU=","url":"https://api.github.com/repos/Azure/azure-sdk-for-go/labels/committed","name":"committed","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"joshgav","id":4421720,"node_id":"MDQ6VXNlcjQ0MjE3MjA=","avatar_url":"https://avatars2.githubusercontent.com/u/4421720?v=4","gravatar_id":"","url":"https://api.github.com/users/joshgav","html_url":"https://github.com/joshgav","followers_url":"https://api.github.com/users/joshgav/followers","following_url":"https://api.github.com/users/joshgav/following{/other_user}","gists_url":"https://api.github.com/users/joshgav/gists{/gist_id}","starred_url":"https://api.github.com/users/joshgav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshgav/subscriptions","organizations_url":"https://api.github.com/users/joshgav/orgs","repos_url":"https://api.github.com/users/joshgav/repos","events_url":"https://api.github.com/users/joshgav/events{/privacy}","received_events_url":"https://api.github.com/users/joshgav/received_events","type":"User","site_admin":false},"assignees":[{"login":"joshgav","id":4421720,"node_id":"MDQ6VXNlcjQ0MjE3MjA=","avatar_url":"https://avatars2.githubusercontent.com/u/4421720?v=4","gravatar_id":"","url":"https://api.github.com/users/joshgav","html_url":"https://github.com/joshgav","followers_url":"https://api.github.com/users/joshgav/followers","following_url":"https://api.github.com/users/joshgav/following{/other_user}","gists_url":"https://api.github.com/users/joshgav/gists{/gist_id}","starred_url":"https://api.github.com/users/joshgav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshgav/subscriptions","organizations_url":"https://api.github.com/users/joshgav/orgs","repos_url":"https://api.github.com/users/joshgav/repos","events_url":"https://api.github.com/users/joshgav/events{/privacy}","received_events_url":"https://api.github.com/users/joshgav/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-09T15:55:57Z","updated_at":"2018-09-01T07:43:19Z","closed_at":null,"author_association":"NONE","body":"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: https://github.com/terraform-providers/terraform-provider-azurerm/pull/1516)\r\n\r\nThe actual error :\r\n\r\n`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=[]`\r\n\r\n**Note:** We can eventually delete the subnet, but usually it takes close to an hour before we can do so.\r\n\r\nTaking 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()`](https://godoc.org/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement#ServiceClient.Delete) has succeeded. It would also be natural to assume that these resources are the ones preventing the subnet to be deleted.\r\n\r\nWhat I would expect is that [`ServiceClient.Delete()`](https://godoc.org/github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2017-03-01/apimanagement#ServiceClient.Delete) would return a `azure.Future` (instead of `autorest.Response`) and where `WaitForCompletion()` would succeed when all underlaying API Management resources are properly deleted, or at least detached from resources like subnet."},"comment":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/comments/417840441","html_url":"https://github.com/Azure/azure-sdk-for-go/issues/2199#issuecomment-417840441","issue_url":"https://api.github.com/repos/Azure/azure-sdk-for-go/issues/2199","id":417840441,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzg0MDQ0MQ==","user":{"login":"torresdal","id":1205126,"node_id":"MDQ6VXNlcjEyMDUxMjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1205126?v=4","gravatar_id":"","url":"https://api.github.com/users/torresdal","html_url":"https://github.com/torresdal","followers_url":"https://api.github.com/users/torresdal/followers","following_url":"https://api.github.com/users/torresdal/following{/other_user}","gists_url":"https://api.github.com/users/torresdal/gists{/gist_id}","starred_url":"https://api.github.com/users/torresdal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torresdal/subscriptions","organizations_url":"https://api.github.com/users/torresdal/orgs","repos_url":"https://api.github.com/users/torresdal/repos","events_url":"https://api.github.com/users/torresdal/events{/privacy}","received_events_url":"https://api.github.com/users/torresdal/received_events","type":"User","site_admin":false},"created_at":"2018-09-01T07:43:19Z","updated_at":"2018-09-01T07:43:19Z","author_association":"NONE","body":"@jhendrixMSFT @promoisha Any update on this?"}}
{"actor":{"display_login":"torresdal"}}