Control: VPC subnet auto assign public IP should be disabled
Description
Ensure that AWS Virtual Private Cloud (AWS VPC) subnets are assigned a public IP address. The control is compliant if AWS VPC does not have subnets that are assigned a public IP address. The control is non-compliant if AWS VPC has subnets that are assigned a public IP address.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.vpc_subnet_auto_assign_public_ip_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.vpc_subnet_auto_assign_public_ip_disabled --share
SQL
This control uses a named query:
select subnet_id as resource, case when map_public_ip_on_launch = 'false' then 'ok' else 'alarm' end as status, case when map_public_ip_on_launch = 'false' then title || ' auto assign public IP disabled.' else title || ' auto assign public IP enabled.' end as reason , region, account_idfrom aws_vpc_subnet;