-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update resource manager tag references (#12132) (#838)
[upstream:e206f391912060d32350f824af775a895062c9e2] Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
b1f39e4
commit 2f135f8
Showing
1 changed file
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
data "google_project" "project" { | ||
} | ||
data "google_project" "project" {} | ||
|
||
resource "google_tags_tag_key" "tag_key1" { | ||
parent = "projects/${data.google_project.project.number}" | ||
parent = data.google_project.project.id | ||
short_name = "tag_key1-${local.name_suffix}" | ||
} | ||
|
||
resource "google_tags_tag_value" "tag_value1" { | ||
parent = "tagKeys/${google_tags_tag_key.tag_key1.name}" | ||
parent = google_tags_tag_key.tag_key1.id | ||
short_name = "tag_value1-${local.name_suffix}" | ||
} | ||
|
||
resource "google_tags_tag_key" "tag_key2" { | ||
parent = "projects/${data.google_project.project.number}" | ||
parent = data.google_project.project.id | ||
short_name = "tag_key2-${local.name_suffix}" | ||
} | ||
|
||
resource "google_tags_tag_value" "tag_value2" { | ||
parent = "tagKeys/${google_tags_tag_key.tag_key2.name}" | ||
parent = google_tags_tag_key.tag_key2.id | ||
short_name = "tag_value2-${local.name_suffix}" | ||
} | ||
|
||
resource "google_bigquery_dataset" "dataset" { | ||
dataset_id = "dataset-${local.name_suffix}" | ||
friendly_name = "test" | ||
description = "This is a test description" | ||
location = "EU" | ||
dataset_id = "dataset-${local.name_suffix}" | ||
friendly_name = "test" | ||
description = "This is a test description" | ||
location = "EU" | ||
|
||
resource_tags = { | ||
"${data.google_project.project.project_id}/${google_tags_tag_key.tag_key1.short_name}" = "${google_tags_tag_value.tag_value1.short_name}" | ||
"${data.google_project.project.project_id}/${google_tags_tag_key.tag_key2.short_name}" = "${google_tags_tag_value.tag_value2.short_name}" | ||
(google_tags_tag_key.tag_key1.namespaced_name) = google_tags_tag_value.tag_value1.short_name | ||
(google_tags_tag_key.tag_key2.namespaced_name) = google_tags_tag_value.tag_value2.short_name | ||
} | ||
} |