azure icon indicating copy to clipboard operation
azure copied to clipboard

azure_rm_keyvaultsecret - Recover before update

Open nioertel opened this issue 2 years ago • 3 comments

SUMMARY

Currently the following fails if the secret already exists but is in deleted (recoverable) state:

- name: Create a secret
  azure_rm_keyvaultsecret:
    secret_name: MySecret
    secret_value: My_Pass_Sec
    keyvault_uri: https://contoso.vault.azure.net/

It would be nice if this state is handled by the Ansible module (either automagically or optionally with an additional parameter recover_if_needed).

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

azure_rm_keyvaultsecret

ADDITIONAL INFORMATION

In our setup sometimes manual interactions happen with Key Vault. If someone deletes a secret that is set via Ansible, our scripts fail in the next run with KeyVaultErrorException: (Conflict) Secret ... is currently in a deleted but recoverable state.

I am happy to prepare a PR if this is a feature that you'd like to support.

nioertel avatar Apr 17 '23 20:04 nioertel