turbot/terraform_aws_compliance

Query: ec2_ami_launch_permission_restricted

Usage

powerpipe query terraform_aws_compliance.query.ec2_ami_launch_permission_restricted

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'account_id') is not null then 'ok'
when (attributes_std -> 'group') is not null then 'info'
when (attributes_std -> 'organizational_arn') is not null then 'info'
when (attributes_std -> 'organizational_unit_arn') is not null then 'info'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std -> 'account_id') is not null then ' is restrictive to account(s)'
when (attributes_std -> 'group') is not null then ' is open to IAM group'
when (attributes_std -> 'organizational_arn') is not null then ' is open to organization'
when (attributes_std -> 'organizational_unit_arn') is not null then ' is open to organization unit'
else ' is wide open'
end || '.' as reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_ami_launch_permission';

Controls

The query is being used by the following controls: