turbot/guardrails_insights

Query: accounts_by_workspace

Usage

powerpipe query guardrails_insights.query.accounts_by_workspace

Steampipe Tables

SQL

select
_ctx ->> 'connection_name' as "Connection Name",
sum((output -> 'accounts' -> 'metadata' -> 'stats' ->> 'total')::int) as "Accounts"
from
guardrails_query
where
query = '{
accounts: resources(
filter: "resourceTypeId:tmod:@turbot/turbot#/resource/interfaces/accountable level:self"
) {
metadata {
stats {
total
}
}
}
}'
group by
_ctx ->> 'connection_name';

Dashboards

The query is used in the dashboards: