turbot/ibm_insights

Query: ibm_is_security_group_inbound_rules

Usage

powerpipe query ibm_insights.query.ibm_is_security_group_inbound_rules

Steampipe Tables

SQL

select
concat(text(r -> 'remote' ->> 'cidr_block'), (r -> 'remote' ->> 'id'),(r -> 'remote' ->> 'address')) as "Source",
r ->> 'id' as "Security Group Rule ID",
case
when r ->> 'protocol' = 'all' then 'All Traffic'
else r ->> 'protocol'
end as "Protocol",
case
when r ->> 'port_min' is null and r ->> 'port_max' is null then null
when r ->> 'port_min' is not null
and r ->> 'port_max' is not null
and (r ->> 'port_min') = (r ->> 'port_max') then (r ->> 'port_min')::text
else concat(
(r ->> 'port_min'),
'-',
(r ->> 'port_max')
)
end as "Ports"
from
ibm_is_security_group,
jsonb_array_elements(rules) as r
where
crn = $1
and r ->> 'direction' = 'inbound';

Params

ArgsNameDefaultDescriptionVariable
$1crn

    Dashboards

    The query is used in the dashboards: