Solved Issue 62: Unable to delete APIM when destroying infrastructure with Terraform. #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR solves issue #62
2023-03-01-preview
which does not have the issue when deleting the APIM, instead of version2023-05-01-preview
. There are open issues in GitHub to track this problem in the upstream API:depends_on
) withazurerm_api_management_named_value.tenant_id
for theazurerm_api_management_api_policy.policy
which is required when deleting the APIM due to an indirect dependency with the Tenant ID value.prevent_deletion_if_contains_resources
flag asfalse
to mitigate an open bug in Terraform. For instance, the Resource Group is not deleted when a Failure Anomalies resource is present. Reference: Application Insights feature block hanging and Failure Anomalies Still Auto-Generated hashicorp/terraform-provider-azurerm#18026