bigqueryreservation: add labels field to google_bigquery_reservation - #1391
Merged
Conversation
…on` (#18412) [upstream:0edf32d45099c6ce16ca78dbbcf77e9654888c3d] Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician
merged commit Aug 7, 2026
520beb8
into
terraform-google-modules:master
3 checks passed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copy of GoogleCloudPlatform/magic-modules#18180 done by @joyan0930 as we need the feature but the initial author seems to not getting back after the review.
Fixes hashicorp/terraform-provider-google#25304.
This PR adds a
labelsfield to thegoogle_bigquery_reservationresource. The BigQuery Reservation v1 API already supports alabelsmap on the Reservation resource, but the Terraform provider does not expose it. Exposing labels enables cost allocation via billing export label filters when multiple teams' reservations are managed in a single admin project.Changes
mmv1/products/bigqueryreservation/Reservation.yaml: addlabels(KeyValueLabels). The resource already usesupdate_mask: true/update_verb: PATCH, solabels,terraform_labelsandeffective_labelshandling is fully generated with no custom code.bigquery_reservation_basic.tf.tmpl: addlabelsto the documented sample.resource_bigquery_reservation_test.go.tmpl: addTestAccBigqueryReservation_labels_updatecovering create → update → import (withImportStateVerifyIgnoreforlabels/terraform_labels), following the pattern from #15463 (eventarc channel labels).Local verification
make provider VERSION=ga PRODUCT=bigqueryreservationsucceeds; generated diff includes the labels schema,tpgresource.SetLabelsDiff, andlabelsin the PATCH update mask.go build,go vet, andgofmtpass on the generatedgoogle/services/bigqueryreservationpackage.Derived from GoogleCloudPlatform/magic-modules#18412