Open scott-doyland-burrows opened 2 years ago
I experience the same issue. Also, if the version_set alone is to be deleted, then the apis and the version_set have have to be deleted as described here with two runs, and then we need to create the api without an version_set.
I would expect that to be handled by the provider properly, so it can be done in one run
Is there an existing issue for this?
Community Note
Terraform Version
1.2.1
AzureRM Provider Version
3.9.0
Affected Resource(s)/Data Source(s)
azurerm_api_management_api_version_set
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
azurerm_api_management_api_version_set resource should be deleted.
Actual Behaviour
On the first run of a destroy I get the error as above.
I look in the APIs in the APIM resource via the Portal and there are none (they are destroyed).
Running a second destroy works as there are now no APIs so the azurerm_api_management_api_version_set resource can destroy cleanly.
I assume there is some sort of timing issue and the APIs are still "active" when the resource is being destroyed during the first destroy.
Steps to Reproduce
Setup code as above and apply.
The destroy it.
Important Factoids
No response
References
No response