SERVER SIDE ENCRYPTION - PMK TO CMK

Venkat 60 Reputation points
2023-07-18T21:14:20.5733333+00:00

We have several linux azure VMs and storage accounts with SSE encryption being Platform managed keys. The existing infra built using terraform. Now we are planning to convert all managed disks and storage accounts to SSE CMK. The question is, Does pmk to cmk is possible to do using terraform ?

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,158 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,809 questions
Azure Disk Encryption
Azure Disk Encryption
An Azure service for virtual machines (VMs) that helps address organizational security and compliance requirements by encrypting the VM boot and data disks with keys and policies that are controlled in Azure Key Vault.
162 questions
{count} votes

Accepted answer
  1. JamesTran-MSFT 36,496 Reputation points Microsoft Employee
    2023-07-19T21:13:11.6366667+00:00

    @Venkat

    Thank you for your post!

    I understand that you have several Linux VMs and Storage Accounts with SSE + PMK enabled and are now planning to migrate all your Managed Disks and Storage Accounts to SEE + CMK but are looking for a possible solution to do this using Terraform. To hopefully help point you in the right direction, I'll share my findings below.


    Findings:

    I wasn't able to locate anything specific on the Azure side of things regarding enabling SSE + CMK via Terraform. However, when looking through the Terraform azurerm provider registry you might be able to leverage the azurerm_managed_disk and azurerm_disk_encryption_set resources to convert your existing SSE encryption from PMK to CMK.

    Because you'll need to create a Terraform specific script to convert your existing SSE+PMK encryption, I'd recommend reaching out to the Terraform Community so their experts can further assist with this. For more info Terraform Community.

    I hope this helps!

    If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.


    If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful