Skip to content

Commit a05b7d0

Browse files
Update tags_tag_key.html.markdown (#7743) (#5504)
Update parent field to include projects now that they're supported. Signed-off-by: Modular Magician <[email protected]>
1 parent 8691363 commit a05b7d0

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.changelog/7743.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
updated the docs for project parented tags.
3+
```

website/docs/d/tags_tag_key.html.markdown

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
subcategory: "Tags"
33
description: |-
4-
Get a tag key within a GCP organization.
4+
Get a tag key within a GCP organization or project.
55
---
66

77
# google\_tags\_tag\_key
88

9-
Get a tag key within a GCP org by `parent` and `short_name`.
9+
Get a tag key by org or project `parent` and `short_name`.
1010

1111
## Example Usage
1212

@@ -16,14 +16,20 @@ data "google_tags_tag_key" "environment_tag_key"{
1616
short_name = "environment"
1717
}
1818
```
19+
```tf
20+
data "google_tags_tag_key" "environment_tag_key"{
21+
parent = "projects/abc"
22+
short_name = "environment"
23+
}
24+
```
1925

2026
## Argument Reference
2127

2228
The following arguments are supported:
2329

2430
* `short_name` - (Required) The tag key's short_name.
2531

26-
* `parent` - (Required) The resource name of the parent organization in format `organizations/{org_id}`.
32+
* `parent` - (Required) The resource name of the parent organization or project. It can be in format `organizations/{org_id}` or `projects/{project_id_or_number}`.
2733

2834
## Attributes Reference
2935

@@ -35,7 +41,7 @@ In addition to the arguments listed above, the following attributes are exported
3541
The generated numeric id for the TagKey.
3642

3743
* `namespaced_name` -
38-
Namespaced name of the TagKey.
44+
Namespaced name of the TagKey which is in the format `{parentNamespace}/{shortName}`.
3945

4046
* `create_time` -
4147
Creation time.

0 commit comments

Comments
 (0)