Control: 3.1 Ensure legacy networks does not exist
Description
In order to prevent use of legacy networks, ECS instances should not have a legacy network configured.
Remediation
From Console
- Logon to ECS Console.
- In the left-side navigation pane, choose
Instance & Image > Instances
. - Click
Create Instance
. - Specify the basic instance information required by following the instruction and click
Next: Networking
. - Select the
Network Type
ofVPC
.
Usage
Run the control in your terminal:
powerpipe control run alicloud_compliance.control.cis_v100_3_1
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run alicloud_compliance.control.cis_v100_3_1 --share
SQL
This control uses a named query:
select arn as resource, case when instance_network_type = 'vpc' then 'ok' else 'alarm' end as status, case when instance_network_type = 'vpc' then title || ' has VPC network.' else title || ' has legacy network.' end as reason , account_id as account_id, region as regionfrom alicloud_ecs_instance;