turbot/steampipe-mod-aws-compliance

Control: VPC EIPs should be associated with an EC2 instance or ENI

Description

This rule ensures Elastic IPs allocated to a AWS Virtual Private Cloud (AWS VPC) are attached to AWS Elastic Compute Cloud (AWS EC2) instances or in-use Elastic Network Interfaces.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.vpc_eip_associated

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.vpc_eip_associated --share

SQL

This control uses a named query:

select
'arn:' || partition || ':ec2:' || region || ':' || account_id || ':eip/' || allocation_id as resource,
case
when association_id is null then 'alarm'
else 'ok'
end status,
case
when association_id is null then title || ' is not associated with any resource.'
else title || ' is associated with a resource.'
end reason
, region, account_id
from
aws_vpc_eip;

Tags