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

Key vault Destroy failure #26236

Closed
1 task done
farwind opened this issue Jun 5, 2024 · 2 comments
Closed
1 task done

Key vault Destroy failure #26236

farwind opened this issue Jun 5, 2024 · 2 comments
Milestone

Comments

@farwind
Copy link

farwind commented Jun 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Terraform Version

1.5.7

AzureRM Provider Version

3.106.1

Affected Resource(s)/Data Source(s)

azurerm_key_vault*

Terraform Configuration Files

N/A

Debug Output/Panic Output

Plan: 0 to add, 0 to change, 7 to destroy.
azurerm_key_vault_key.this: Destroying... [id=https://kv-cancom-c-po-9tqf-we-t.vault.azure.net/keys/kvk-cancom-ci-postgresqlflexible-9tqf-we-test/56b1858dc72744d0a10ca70d6a9a09a8]
╷
│ Error: retrieving the Resource ID the Key Vault at URL "https://kv-cc-c-po-9tqf-we-t.vault.azure.net/": populating the Key Vaults cache for Subscription (Subscription: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"): retrieving Key Vault (Subscription: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
│ Resource Group Name: "rg-cc-ci-applicationgateway-eauc-we-test"
│ Key Vault Name: "kv-cc-c-ap-eauc-we-t"): unexpected status 404 (404 Not Found) with error: ResourceGroupNotFound: Resource group 'rg-cc-ci-applicationgateway-eauc-we-test' could not be found.
│ 

Plan: 0 to add, 0 to change, 15 to destroy.
module.defaults.azurerm_key_vault_secret.this[0]: Destroying... [id=https://kv-cc-c-wi-e3uq-we-t.vault.azure.net/secrets/kvs-cc-ci-winvirtualmachine-e3uq-we-test/fb363b895feb4b98a91f5bd225641da9]
azurerm_key_vault_key.this: Destroying... [id=https://kv-cc-c-wi-e3uq-we-t.vault.azure.net/keys/kvk-cc-ci-winvirtualmachine-e3uq-we-test/3181f4e65656449396ca915fcf459107]
module.defaults2.azurerm_key_vault_secret.this[0]: Destroying... [id=https://kv-cc-c-wi-e3uq-we-t.vault.azure.net/secrets/kvs-cc-ci-winvirtualmachine-sr2n-we-test/528a1e5954ec4f3bad7c3a748fc1d89b]
azurerm_key_vault_secret.this: Destroying... [id=https://kv-cc-c-wi-e3uq-we-t.vault.azure.net/secrets/extension-secret/d9eae9ec31be43bfaef72fde0d9503ce]
╷
│ Error: retrieving the Resource ID the Key Vault at URL "https://kv-cc-c-wi-e3uq-we-t.vault.azure.net/": populating the Key Vaults cache for Subscription (Subscription: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"): retrieving Key Vault (Subscription: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
│ Resource Group Name: "rg-cc-ci-applicationgateway-eauc-we-test"
│ Key Vault Name: "kv-cc-c-ap-eauc-we-t"): unexpected status 404 (404 Not Found) with error: ResourceGroupNotFound: Resource group 'rg-cc-ci-applicationgateway-eauc-we-test' could not be found.
│

Expected Behaviour

delete created keyvault without any issues

Actual Behaviour

reporting error that completely unrelated keyvault doesnt exist, this happened in every keyvault created with new version of azurerm 3.106.1 and when trying to delete it complains in every one of them about same missing nonexistent keyvault.

after reverting back to version 3.105.0 we were able to delete said created key vaults without same error message.

Steps to Reproduce

create several keyvaults with secrets and then try to delete them

Important Factoids

no

References

N/A

@tombuildsstuff
Copy link
Contributor

hey @farwind

Thanks for opening this issue.

Taking a look through here this has been fixed via #26199 (where the Azure API is returning stale data about deleted Key Vaults that no longer exists) which will ship in this weeks release - as you've mentioned you should be able to pin to the older version of the Provider to workaround this in the interim. Since the fix for this one's already been merged I'm going to close this issue for the moment, but assign this to the this weeks milestone, and when the release is available the bot will comment to let you know :)

Thanks!

@tombuildsstuff tombuildsstuff added this to the v3.107.0 milestone Jun 5, 2024
Copy link

github-actions bot commented Jul 6, 2024

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants