Azure / aihub

AI Hub Executive Demo HandsOn
https://azure.github.io/aihub
MIT License
48 stars 22 forks source link

Destroying the infrastructure leaves the Azure API Management in an invalid state #62

Closed rliberoff closed 4 months ago

rliberoff commented 4 months ago

Doing a destruction with terraform (terraform apply -destroy -auto-approve) does not fully deletes the Azure API Management (APIM), and the following error is reported:

╷
│ Error: Failed to delete resource
│
│ deleting Resource: (ResourceId "/subscriptions/c23dfe1f-222e-4aa1-a8b6-6624b45373aa/resourceGroups/rg-aihub-0096a/providers/Microsoft.ApiManagement/service/apim-aihub-0096a" / Api Version
│ "2023-05-01-preview"): the response did not contain a body
╵

The issue Impossible destroy API Management StandardV2 was created in the terraform-provider-azapi repo to report this behaviour.

It seems that this problem only happens in the latest api-version 2023-05-01-preview, and that it seems to work as expected in version 2023-03-01-preview.

Thus, let's change the version of the API for the APIM an check the issue is solved.

rliberoff commented 4 months ago

It seems that the issue is actually an upstream API issue. The team behind the terraform-provider-azapi have created another issue to track it: https://github.com/Azure/azure-rest-api-specs/issues/29387