Preserving Azure Key Vault access policies when recreating with Bicep
While RBAC roles are the preferred access control method for Key Vaults, there are still projects where you need to work with access policies, where a Managed Identity is given specific permissions to the Key Vault.
In the latter case, a common challenge arises when recreating a Key Vault with Bicep - you lose all existing access policies. This phenomenon is documented in this GitHub issue.
In this article, you will find a simple trick to preserve and reapply them during deployment.
Read the complete article