For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/terraform-aws-workspaces-workspace-volume-not-encrypted.md.
A documentation index is available at /llms.txt.
AWS Workspaces provides virtual desktop infrastructure in the cloud with both root and user volumes that should be encrypted to protect sensitive data from unauthorized access. When these volumes are not encrypted, workspace data including user files, system configurations, and application data are vulnerable to exposure if the storage media is compromised or improperly decommissioned. To properly secure your workspaces, the root_volume_encryption_enabled and user_volume_encryption_enabled attributes must be set to true, as shown in the following example:
resource"aws_workspaces_workspace""example"{ // Other configuration...
root_volume_encryption_enabled=trueuser_volume_encryption_enabled=truevolume_encryption_key="alias/aws/workspaces"}