Skip to content

googleTagsTagBinding

A TagBinding represents a connection between a TagValue and a cloud resource (currently project, folder, or organization). Once a TagBinding is created, the TagValue is applied to all the descendants of the cloud resource.

To get more information about TagBinding, see:

Example Usage - Tag Binding Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleProjectProject = new google.project.Project(this, "project", {
  name: "project_id",
  org_id: "123456789",
  project_id: "project_id",
});
const googleTagsTagKeyKey = new google.tagsTagKey.TagsTagKey(this, "key", {
  description: "For keyname resources.",
  parent: "organizations/123456789",
  short_name: "keyname",
});
const googleTagsTagValueValue = new google.tagsTagValue.TagsTagValue(
  this,
  "value",
  {
    description: "For valuename resources.",
    parent: `tagKeys/\${${googleTagsTagKeyKey.name}}`,
    short_name: "valuename",
  }
);
new google.tagsTagBinding.TagsTagBinding(this, "binding", {
  parent: `//cloudresourcemanager.googleapis.com/projects/\${${googleProjectProject.number}}`,
  tag_value: `tagValues/\${${googleTagsTagValueValue.name}}`,
});

Argument Reference

The following arguments are supported:

  • parent - (Required) The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123

  • tagValue - (Required) The TagValue of the TagBinding. Must be of the form tagValues/456.


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format tagBindings/{{name}}

  • name - The generated id for the TagBinding. This is a string of the form: tagBindings/{fullResourceName}/{tagValueName}

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

TagBinding can be imported using any of these accepted formats:

$ terraform import google_tags_tag_binding.default tagBindings/{{name}}
$ terraform import google_tags_tag_binding.default {{name}}