Control: 4.2 Ensure that 'Virtual Machine’s disk' are encrypted
Description
Ensure that disk are encrypted when it is created with the creation of VM instance.
Remediation
From Console
Encrypt a system disk when copying an image in the ECS console by following the below steps:
- Logon to ECS Console.
- In the left-side navigation pane, choose
Instances & Images > Instances. - In the top navigation bar, select a region.
- On the
Imagespage, click theCustom Imagetab. - Select the target image and click
Copy Imagein theActionscolumn. - In the
Copy Imagedialog box, check theEncryptbox and then select a key from the drop-down list. - Click OK.
You can encrypt a data disk when creating an instance by following the below steps:
- Logon to ECS Console.
- In the left-side navigation pane, choose
Instances & Images > Instances. - On the
Instancespage, clickCreate Instance. - On the
Basic Configurationspage, find theStoragesection and perform the following steps- Click
Add Disk. - Specify the disk category and capacity of data disk.
- Select
Disk Encryptionand then select a key from the drop-down list.
- Click
Usage
Run the control in your terminal:
powerpipe control run alicloud_compliance.control.cis_v100_4_2Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run alicloud_compliance.control.cis_v100_4_2 --shareSQL
This control uses a named query:
select arn as resource, case when encrypted then 'ok' else 'alarm' end as status, case when encrypted then title || ' encryption enabled.' else title || ' encryption disabled.' end as reason , account_id as account_id, region as regionfrom alicloud_ecs_diskwhere status = 'In_use';