Using Console
Using CLI
az login
.
az disk-encryption-set list
.
az disk-encryption-set create
. You will need to specify the name of the encryption set, the resource group, and the location.
az disk update
. You will need to specify the name of the disk, the resource group, and the ID of the encryption set.
az disk show
. This will display the disk details, including the encryption status.
encryption-type
parameter is set to “EncryptionAtRestWithPlatformKey” which means encryption will be done using the Azure platform key. You can also use “EncryptionAtRestWithCustomerKey” to use your own customer-managed key for encryption.I hope this helps! Let me know if you have any further questions.Using Python
<your tenant id>
, <your client id>
, <your client secret>
, <your subscription id>
, <your key vault id>
, <your secret url>
, <your key url>
, and <your key version>
with your actual values.