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

Solved Issue 62: Unable to delete APIM when destroying infrastructure with Terraform. #63

Merged

Conversation

rliberoff
Copy link
Contributor

This PR solves issue #62

…aform was indicating a `forced replacement` due to a calculation of the resource group ID. Passing it as a variable from the main module helps Terraform no to force a replacement, and updating APIs and policies without issue.

Also, updated the dependency on the policy item to the tenant ID named value.
… not have the issue when deleting the APIM.

- Added dependency (`depends_on`) with  for `azurerm_api_management_named_value.tenant_id` for the `azurerm_api_management_api_policy.policy` which is required when deleting the APIM due to an indirect dependency with the Tenant ID value.
…ate an open bug in Terraform. or instance, the Resource Group is not deleted when a `Failure Anomalies` resource is present. Reference: hashicorp/terraform-provider-azurerm#18026
@rliberoff rliberoff self-assigned this Jun 12, 2024
@rliberoff rliberoff added the bug Something isn't working label Jun 12, 2024
Copy link
Member

@cmendible cmendible left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmendible cmendible merged commit 2af03f3 into Azure:main Jun 12, 2024
4 checks passed
@rliberoff rliberoff deleted the Indempotence_issue_with_Terraform_templates branch June 25, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Destroying the infrastructure leaves the Azure API Management in an invalid state
2 participants