Skip to content

Commit 5eafee8

Browse files
committed
Parent must use project id
1 parent ce23ce7 commit 5eafee8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

main.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ locals {
9494
}
9595
}
9696

97-
data "google_project" "project" {
98-
project_id = var.project_id
99-
}
100-
10197
# Retrieve the tag keys for the tags that we are passing to the resources.
10298
# We split the friendly name we are passing to the module, to get the tag key shortname
10399
# as the index 0, and the tag value shortname as the index 1.
@@ -130,7 +126,7 @@ resource "google_tags_location_tag_binding" "buckets" {
130126
resource "google_tags_location_tag_binding" "cloudsql" {
131127
for_each = local.map_of_cloudsql_instances_to_be_tagged
132128
# Parent full resource name reference: https://cloud.google.com/iam/docs/full-resource-names
133-
parent = "//sqladmin.googleapis.com/projects/${data.google_project.project.number}/instances/${each.value.instance_id}"
129+
parent = "//sqladmin.googleapis.com/projects/${var.project_id}/instances/${each.value.instance_id}"
134130
location = each.value.instance_location
135131
tag_value = data.google_tags_tag_value.tag_values[each.value.tag_friendly_name].id
136132
}

0 commit comments

Comments
 (0)