turbot/terraform_aws_compliance

Query: ec2_instance_not_use_multiple_enis

Usage

powerpipe query terraform_aws_compliance.query.ec2_instance_not_use_multiple_enis

Steampipe Tables

SQL

select
address as resource,
case
when jsonb_typeof(attributes_std -> 'network_interface') is null then 'skip'
when (jsonb_typeof(attributes_std -> 'network_interface'))::text = 'object' then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when jsonb_typeof(attributes_std -> 'network_interface') is null then ' has no ENI attached'
when (jsonb_typeof(attributes_std -> 'network_interface'))::text = 'object' then ' has 1 ENI attached'
else ' has ' || (jsonb_array_length(attributes_std -> 'network_interface')) || ' ENI(s) attached'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_instance';

Controls

The query is being used by the following controls: