Table: gcp_tag_binding - Query GCP Tag Bindings using SQL
Google Cloud's Tag Manager allows users to attach metadata to GCP resources in the form of tags. Tags are key-value pairs that help in organizing and managing resources, such as VM instances, storage buckets, and networks. Tag bindings are the association between a tag and a resource, which allows users to filter and manage resources based on their metadata.
Examples
Basic info
Explore which resources are tagged within your Google Cloud Platform, gaining insights into the associated tags and resource types. This can be particularly useful for managing and organizing your resources.
select name, parent, tag_value, titlefrom gcp_tag_bindingwhere parent = '//cloudresourcemanager.googleapis.com/projects/your-project-id';
select name, parent, tag_value, titlefrom gcp_tag_bindingwhere parent = '//cloudresourcemanager.googleapis.com/projects/your-project-id';
Schema for gcp_tag_binding
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
name | text | The name of the TagBinding. This is a string of the form: `tagBindings/{full-resource-name}/{tag-value-name}`. | |
parent | text | = | The full resource name of the resource the TagValue is bound to. |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tag_value | text | The TagValue of the TagBinding. Must be of the form `tagValues/456`. | |
tag_value_namespaced_name | text | The namespaced name for the TagValue of the TagBinding. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- gcp
You can pass the configuration to the command with the --config
argument:
steampipe_export_gcp --config '<your_config>' gcp_tag_binding