turbot/terraform_aws_compliance

Query: sqs_vpc_endpoint_without_dns_resolution

Usage

powerpipe query terraform_aws_compliance.query.sqs_vpc_endpoint_without_dns_resolution

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std ->> 'service_name') like '%sqs%'
and (attributes_std -> 'private_dns_enabled') is null then 'alarm'
when (attributes_std ->> 'service_name') like '%sqs%'
and (attributes_std -> 'private_dns_enabled') :: bool then 'ok'
when (attributes_std ->> 'service_name') like '%sqs%'
and (attributes_std -> 'private_dns_enabled') :: bool = false then 'alarm'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std ->> 'service_name') like '%sqs%'
and (attributes_std -> 'private_dns_enabled') is null then ' private DNS disabled'
when (attributes_std ->> 'service_name') like '%sqs%'
and (attributes_std -> 'private_dns_enabled') :: bool then ' private DNS enabled'
when (attributes_std ->> 'service_name') like '%sqs%'
and (attributes_std -> 'private_dns_enabled') :: bool = false then ' private DNS disabled'
end || '.' as reason,
path || ':' || start_line
from
terraform_resource
where
type = 'aws_vpc_endpoint';

Controls

The query is being used by the following controls: