A TagKey, used to group a set of TagValues.
To get more information about TagKey, see:
resource "google_tags_tag_key" "key" {
parent = "organizations/123456789"
short_name = "keyname"
description = "For keyname resources."
}
The following arguments are supported:
parent
-
(Required)
Input only. The resource name of the new TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
short_name
-
(Required)
Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.
The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
description
-
(Optional)
User-assigned description of the TagKey. Must not exceed 256 characters.
purpose
-
(Optional)
Optional. A purpose cannot be changed once set.
A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag.
Possible values are: GCE_FIREWALL
.
purpose_data
-
(Optional)
Optional. Purpose data cannot be changed once set.
Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: network = "<project-name>/<vpc-name>"
.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format tagKeys/{{name}}
name
-
The generated numeric id for the TagKey.
namespaced_name
-
Output only. Namespaced name of the TagKey.
create_time
-
Output only. Creation time.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
update_time
-
Output only. Update time.
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.TagKey can be imported using any of these accepted formats:
tagKeys/{{name}}
{{name}}
In Terraform v1.5.0 and later, use an import
block to import TagKey using one of the formats above. For example:
import {
id = "tagKeys/{{name}}"
to = google_tags_tag_key.default
}
When using the terraform import
command, TagKey can be imported using one of the formats above. For example:
$ terraform import google_tags_tag_key.default tagKeys/{{name}}
$ terraform import google_tags_tag_key.default {{name}}