turbot/terraform_oci_compliance
GitHub

Query: vcn_security_group_has_stateless_ingress_security_rules

Usage

steampipe query terraform_oci_compliance.query.vcn_security_group_has_stateless_ingress_security_rules

Plugins & 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: