MySQL servers should use customer-managed keys to encrypt data at rest
Use customer-managed keys to manage the encryption at rest of your MySQL servers. By default, the data is encrypted at rest with service-managed keys. Customer-managed keys enable the data to be encrypted with an Azure Key Vault key.
By default, the data is encrypted at rest with service-managed keys, but customer-managed keys are commonly required to meet regulatory compliance standards. You have full control and responsibility for the key lifecycle, including rotation and management.
What this control checks
MySQL servers must have a key of serverKeyType AzureKeyVault with a non-empty uri
Common pitfalls
Default is service-managed keys
By default, the data is encrypted at rest with service-managed keys.
Server must connect to a key resource
Checkov CKV2_AZURE_16 requires an azurerm_mysql_server to be connected to an azurerm_mysql_server_key.
Audit evidence
Evidence that deployed resources meet this control: Azure Policy compliance results for the built-in policy definition "MySQL servers should use customer-managed keys to encrypt data at rest" (83cef61d-dbd1-4b20-a4fc-5fbc7da10833); PowerPipe control azure_compliance.control.mysql_server_encrypted_at_rest_using_cmk.
Scans of the Terraform code that flag the same setting before deployment: Checkov check CKV2_AZURE_16.
Framework-specific interpretation
NIST SP 800-53 Rev 5: Mapped to SC-12 (Cryptographic Key Establishment and Management).
FedRAMP Moderate Baseline Rev 4: Mapped to SC-12 (Cryptographic Key Establishment And Management).
Framework mappings
The clauses this control is mapped to in each framework.
- Cryptographic Key Establishment And Management (SC-12)
FedRAMP Moderate Baseline Rev 4
- SC-12 Cryptographic Key Establishment And Management
- 3.13.10 Establish and manage cryptographic keys for cryptography employed in organizational systems
- 2.1.1.2.1 Ensure Critical Data is Encrypted with Customer Managed Keys (CMK)
- 3.1.h Public Key Infrastructure (PKI)
- SC.L2-3.13.10 Establish and manage cryptographic keys for cryptography employed in organizational systems
- SC-12 Cryptographic Key Establishment And Management
Related controls
Tool mappings
Use these identifiers to cross-reference this control across tools, reports, and evidence.
- Compliance.tf Control:
mysql_server_encrypted_at_rest_using_cmk - Checkov Check:
CKV2_AZURE_16 - Powerpipe Control:
azure_compliance.control.mysql_server_encrypted_at_rest_using_cmk - Azure Policy Definition:
83cef61d-dbd1-4b20-a4fc-5fbc7da10833
Last reviewed: 2026-10-13