Skip to content
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

Destroying API manager fails (MS API change) #2945

Closed
hbuckle opened this issue Feb 25, 2019 · 2 comments · Fixed by #2958
Closed

Destroying API manager fails (MS API change) #2945

hbuckle opened this issue Feb 25, 2019 · 2 comments · Fixed by #2958

Comments

@hbuckle
Copy link
Contributor

hbuckle commented Feb 25, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.11.11

  • provider.azurerm v1.22.1

Affected Resource(s)

  • azurerm_api_management

Terraform Configuration Files

resource "azurerm_resource_group" "resource_group" {
  name     = "apimanhbtest"
  location = "uksouth"
}

resource "azurerm_api_management" "api_management" {
  name                = "example-apim-hb"
  location            = "${azurerm_resource_group.resource_group.location}"
  resource_group_name = "${azurerm_resource_group.resource_group.name}"
  publisher_name      = "My Company"
  publisher_email     = "[email protected]"

  sku {
    name     = "Developer"
    capacity = 1
  }
}

As discussed here destroying API managers now fails. The API manager service has been updated to return 202 on delete operations but the specs have not been updated to reflect this. Terraform is using 2018-06-01-preview API version, 2018-01-01 does not have this issue.

* azurerm_api_management.api_management: Error deleting API Management Service "example-apim-hb" (Resource Group "apimanhbtest"): apimanagement.ServiceClient#Delete: Failure responding to request: StatusCode=202 -- Original Error: autorest/azure:
Service returned an error. Status=202 Code="Unknown" Message="Unknown service error" Details=[{"etag":"AAAAAAFfr/4=","id":"/subscriptions/020ef497-e33d-4705-859b-08663256a4bc/resourceGroups/apimanhbtest/providers/Microsoft.ApiManagement/service/example-apim-hb","identity":null,"location":"UK South","name":"example-apim-hb","properties":{"additionalLocations":null,"certificates":[],"createdAtUtc":"2019-02-25T09:51:20.5812503Z","customProperties":{"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2":"False","Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30":"false","Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10":"false","Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11":"false","Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168":"false","Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30":"false","Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10":"false","Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11":"false"},"gatewayRegionalUrl":"https://example-apim-hb-uksouth-01.regional.azure-api.net","gatewayUrl":"https://example-apim-hb.azure-api.net","hostnameConfigurations":[],"managementApiUrl":"https://example-apim-hb.management.azure-api.net","notificationSenderEmail":"[email protected]","portalUrl":"https://example-apim-hb.portal.azure-api.net","privateIPAddresses":null,"provisioningState":"Failed","publicIPAddresses":null,"publisherEmail":"[email protected]","publisherName":"My Company","scmUrl":"https://example-apim-hb.scm.azure-api.net","targetProvisioningState":"Deleting","virtualNetworkConfiguration":null,"virtualNetworkType":"None"},"sku":{"capacity":1,"name":"Developer"},"tags":{},"type":"Microsoft.ApiManagement/service"}]
@ghost
Copy link

ghost commented Mar 8, 2019

This has been released in version 1.23.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
	version = "~> 1.23.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 29, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.