turbot/terraform_oci_compliance

Query: vcn_security_group_has_stateless_ingress_security_rules

Usage

powerpipe query terraform_oci_compliance.query.vcn_security_group_has_stateless_ingress_security_rules

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std ->> 'direction' = 'INGRESS') and (attributes_std ->> 'stateless' is null or (attributes_std ->> 'stateless')::bool is not true) then 'alarm'
when (attributes_std ->> 'direction' is null) or (attributes_std ->> 'direction' <> 'INGRESS') then 'info'
else 'ok'
end as status,
split_part(address, '.', 2) || case
when (attributes_std ->> 'direction' = 'INGRESS') and (attributes_std ->> 'stateless' is null or (attributes_std ->> 'stateless')::bool is not true) then ' does not have stateless ingress security rules'
when (attributes_std ->> 'direction' is null) or (attributes_std ->> 'direction' <> 'INGRESS') then ' has no ingress security rules'
else ' has stateless ingress security rules'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'oci_core_network_security_group_security_rule';

Controls

The query is being used by the following controls: