Review automatic rotation of Alicloud KMS keys

Configure automatic rotation and an appropriate interval for supported keys.

Description

Check which kind of KMS key you use before choosing a rotation interval. Rotation creates a new key version for encryption.

Potential impact

If rotation is disabled or too infrequent, the same key material stays in use beyond your policy’s limit.

Remediation

For an eligible symmetric key, set automatic_rotation = "Enabled" and check the next rotation date. Default keys use 365 days and require the rotation service. Eligible software keys in a KMS instance support 7–365 days. Plan manual replacement or rotation for imported material and other unsupported keys.

Examples

This example uses a default key. Existing ciphertext still depends on the key version that encrypted it.

Before

hcl
resource "alicloud_kms_key" "key" {
  description            = "Hello KMS"
  pending_window_in_days = "7"
  status                 = "Enabled"
  automatic_rotation     = "Disabled"
}

After

hcl
resource "alicloud_kms_key" "key" {
  description            = "Hello KMS"
  pending_window_in_days = "7"
  status                 = "Enabled"
  automatic_rotation     = "Enabled"
  rotation_interval      = "365d"
}

References