turbot/guardrails_insights

Query: active_controls_by_workspace

Usage

powerpipe query guardrails_insights.query.active_controls_by_workspace

Steampipe Tables

SQL

select
_ctx ->> 'connection_name' as "Connection Name",
sum((output -> 'total_controls' -> 'metadata' -> 'stats' ->> 'total')::int) as "Active Controls"
from
guardrails_query
where
query = '{
total_controls: controls(
filter: "state:active !resourceTypeId:tmod:@turbot/turbot#/resource/types/turbot"
) {
metadata {
stats {
total
}
}
}
}'
group by
_ctx ->> 'connection_name';

Dashboards

The query is used in the dashboards: