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_tagorder by key, value;
Find all resources for the Sales department
select key, value, resource_idsfrom turbot_tagwhere key = 'Department' and value = 'Sales';
Find departments with the most tagged resources
select key, value, jsonb_array_length(resource_ids) as countfrom turbot_tagwhere key = 'Department'order by count desc;
List tags without values
select *from turbot_tagwhere value is null or trim(value) = '';
Schema for turbot_tag
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
create_timestamp | timestamp with time zone | When the tag was first discovered by Turbot. (It may have been created earlier.) | |
filter | text | = | Filter used for this tag list. |
id | bigint | = | Unique identifier of the tag. |
key | text | = | Tag key. |
resource_ids | jsonb | Turbot IDs of resources with this tag. | |
timestamp | timestamp with time zone | Timestamp when the tag was last modified (created, updated or deleted). | |
update_timestamp | timestamp with time zone | When the tag was last updated in Turbot. | |
value | text | = | Tag value. |
version_id | bigint | Unique identifier for this version of the tag. | |
workspace | text | Specifies the workspace URL. |