Description
encrypt_type = "1" uses a NAS-managed KMS key. With provider 1.293.0, use 2 and kms_key_id for a customer-managed key on Extreme NAS.
Potential impact
Disabling or deleting a customer key can make the file system inaccessible.
Remediation
If you need a customer key, grant NAS permission to use it and check the recovery procedure. Encryption and key selection are fixed at creation. Keep the original Terraform resource and add the destination alongside it. Copy and verify the files before switching mounts.
Examples
The General-purpose NAS example omits encryption and defaults to 0. For the Extreme NAS example, supply a supported capacity, zone and usable key ID, then configure mount targets and permissions.
No explicit encryption configuration
resource "alicloud_nas_file_system" "nas_without_kms" {
protocol_type = "NFS"
storage_type = "Performance"
description = "tf-testAccNasConfig"
}
Extreme NAS with a customer key
resource "alicloud_nas_file_system" "nas_with_kms" {
protocol_type = "NFS"
storage_type = "standard"
file_system_type = "extreme"
capacity = var.nas_capacity
zone_id = var.nas_zone_id
description = "tf-testAccNasConfig"
encrypt_type = "2"
kms_key_id = "1234abcd-12ab-34cd-56ef-1234567890ab"
}