Hi Tony Yip,
When setting up encryption scopes, you should indeed see an option to select keys from a managed HSM. This might not be directly visible in the dropdown if the managed HSM is not properly configured or if there are permission issues.
Few steps to troubleshoot:
- Verify Permissions:
- Ensure that the managed identity of your storage account has the necessary permissions to access the managed HSM. The role Managed HSM Crypto Service Encryption User should be assigned to the storage account’s managed identity for the specific key in the HSM.
- Check Region Compatibility:
- If your managed HSM and storage account are in different regions, you might need to manually enter the key URI. Ensure that the key URI is correctly formatted and accessible.
- Use Azure CLI for Configuration:
Sometimes, using the Azure CLI can help bypass UI limitations. Here’s how you can assign a key from a managed HSM to an encryption scope using Azure CLI:
az storage account encryption-scope create \
--resource-group <resource-group> \
--account-name <storage-account> \
--name <encryption-scope-name> \
--key-source Microsoft.KeyVault \
--key-uri <key-uri>
- Ensure Managed HSM is Properly Configured:
- Double-check that your managed HSM is correctly set up and that the keys are available and accessible. You can refer to the Microsoft documentation on configuring encryption with customer-managed keys stored in Azure Key Vault Managed HSM.
https://learn.microsoft.com/en-us/azure/storage/common/customer-managed-keys-configure-key-vault-hsm
- Double-check that your managed HSM is correctly set up and that the keys are available and accessible. You can refer to the Microsoft documentation on configuring encryption with customer-managed keys stored in Azure Key Vault Managed HSM.
If you still don’t see the managed HSM option in the dropdown let me know in the "comments" and I would be happy to help you,
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.