turbot/terraform_aws_compliance

Query: sagemaker_notebook_instance_direct_internet_access_disabled

Usage

powerpipe query terraform_aws_compliance.query.sagemaker_notebook_instance_direct_internet_access_disabled

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'direct_internet_access') is null or (attributes_std ->> 'direct_internet_access') = 'Disabled' then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when trim(attributes_std ->> 'direct_internet_access') = '' then ' ''direct_internet_access'' is not defined'
when (attributes_std -> 'direct_internet_access') is null or (attributes_std ->> 'direct_internet_access') = 'Disabled' then ' direct internet access disabled'
else ' direct internet access enabled'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_sagemaker_notebook_instance';

Controls

The query is being used by the following controls: