I am deploying azure infra using terraform. I have an encrypted vm - and it backup keeps failing - with below reason:
Azure Backup Service does not have sufficient permissions to Key Vault for Backup of Encrypted Virtual Machines
I checked the Docs and found i have to create access policy for keyvault - azure backup.
To set permissions:
In the Azure portal, select All services, and search for Key vaults.
Select the key vault associated with the encrypted VM you're backing up.
Select Access policies > Add Access Policy.
Add access policy
In Add access policy > Configure from template (optional), select Azure Backup.
The required permissions are prefilled for Key permissions and Secret permissions.
If your VM is encrypted using BEK only, remove the selection for Key permissions since you only need permissions for secrets.
How do i do this in terraform. cannot find example for this?