File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,21 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.2.1] - 2024-12-16
9+
10+ [ Compare with previous version] ( https://github.com/sparkfabrik/terraform-google-gcp-project-resources-tags-helper/compare/0.2.0...0.2.1 )
11+
12+ ### Changes
13+
14+ - Fix the ` parent ` for the Artifact Registry tags.
15+
816## [ 0.2.0] - 2024-04-02
917
1018[ Compare with previous version] ( https://github.com/sparkfabrik/terraform-google-gcp-project-resources-tags-helper/compare/0.1.0...0.2.0 )
1119
1220### Added
1321
14- - Add support for Artifact Registry tags
22+ - Add support for Artifact Registry tags.
1523
1624## [ 0.1.0] - 2023-08-04
1725
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ data "google_tags_tag_value" "project_tag_values_to_be_discovered" {
2828 short_name = each. value . tag_value_shortname
2929}
3030
31+ data "google_project" "project" {
32+ project_id = var. project_id
33+ }
34+
3135# ---------------------------------
3236# Binding Google Tags to resources
3337# ---------------------------------
@@ -159,7 +163,9 @@ resource "google_tags_location_tag_binding" "cloudsql" {
159163resource "google_tags_location_tag_binding" "artifact_registry" {
160164 for_each = local. map_of_artifact_registry_repositories_to_be_tagged
161165 # Parent full resource name reference: https://cloud.google.com/artifact-registry/docs/repositories/tag-repos#attach
162- parent = " //artifactregistry.googleapis.com/projects/${ var . project_id } /locations/${ each . value . repository_location } /repositories/${ each . value . repository_id } "
166+ # For the Artifact Registry, the parent needs to be in the form:
167+ # //artifactregistry.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/repositories/REPOSITORY_ID
168+ parent = " //artifactregistry.googleapis.com/projects/${ data . google_project . project . number } /locations/${ each . value . repository_location } /repositories/${ each . value . repository_id } "
163169 location = each. value . repository_location
164170 tag_value = data. google_tags_tag_value . tag_values [each . value . tag_friendly_name ]. id
165171}
You can’t perform that action at this time.
0 commit comments