Enable encryption on a running Linux VM.
This template enables encryption on a running linux vm using AAD client secret. This template assumes that the VM is located in the same region as the resource group. If not, please edit the template to pass appropriate location for the VM sub-resources.
Prerequisites
Azure Disk Encryption securely stores the encryption secrets in a specified Azure Key Vault.
The AzureDiskEncryptionPreRequisiteSetup.ps1 script can be used to create the Key Vault and assign appropriate access policies.
Use the below PS cmdlet for getting the "keyVaultSecretUrl" and "keyVaultResourceId"
Get-AzureRmKeyVault -VaultName $KeyVaultName -ResourceGroupName $rgname
References:
- White paper
- Explore Azure Disk Encryption with Azure Powershell
- Explore Azure Disk Encryption with Azure PowerShell – Part 2
Tags: Microsoft.Compute/virtualMachines/extensions, [variables('extensionName')]