steampipe plugin install turbot

Table: turbot_tag

Tags is a unified collection of all tags discovered by Turbot across all resources in all clouds.

It is recommended that queries to this table should include (usually in the where clause) at least one of these columns: id, key, value or filter.

Examples

List all tags

select
*
from
turbot_tag
order by
key,
value;

Find all resources for the Sales department

select
key,
value,
resource_ids
from
turbot_tag
where
key = 'Department'
and value = 'Sales';

Find departments with the most tagged resources

select
key,
value,
jsonb_array_length(resource_ids) as count
from
turbot_tag
where
key = 'Department'
order by
count desc;

List tags without values

select
*
from
turbot_tag
where
value is null
or trim(value) = '';

Schema for turbot_tag

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
create_timestamptimestamp with time zoneWhen the tag was first discovered by Turbot. (It may have been created earlier.)
filtertext=Filter used for this tag list.
idbigint=Unique identifier of the tag.
keytext=Tag key.
resource_idsjsonbTurbot IDs of resources with this tag.
timestamptimestamp with time zoneTimestamp when the tag was last modified (created, updated or deleted).
update_timestamptimestamp with time zoneWhen the tag was last updated in Turbot.
valuetext=Tag value.
version_idbigintUnique identifier for this version of the tag.
workspacetextSpecifies the workspace URL.