Enable encryption on a running Linux VM.

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check

Deploy To Azure Deploy To Azure US Gov Visualize

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:

Tags: Microsoft.Compute/virtualMachines/extensions, [variables('extensionName')]