Control: ECS cluster instances should be in a VPC
Description
Deploy AWS ECS cluster instance within an AWS Virtual Private Cloud (AWS VPC) for a secure communication between a instance and other services within the AWS VPC.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.ecs_cluster_instance_in_vpc
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.ecs_cluster_instance_in_vpc --share
SQL
This control uses a named query:
select c.arn as resource, case when i.vpc_id is null then 'alarm' else 'ok' end as status, case when i.vpc_id is null then c.title || ' not in VPC.' else c.title || ' in VPC.' end as reason , c.region, c.account_idfrom aws_ecs_container_instance as c left join aws_ec2_instance as i on c.ec2_instance_id = i.instance_id;