Skip to content

bigqueryreservation: add labels field to google_bigquery_reservation - #1391

Merged
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-0edf32d45099c6ce16ca78dbbcf77e9654888c3d
Aug 7, 2026
Merged

bigqueryreservation: add labels field to google_bigquery_reservation#1391
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-0edf32d45099c6ce16ca78dbbcf77e9654888c3d

Conversation

@modular-magician

Copy link
Copy Markdown
Collaborator

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 labels field to the google_bigquery_reservation resource. The BigQuery Reservation v1 API already supports a labels map 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: add labels (KeyValueLabels). The resource already uses update_mask: true / update_verb: PATCH, so labels, terraform_labels and effective_labels handling is fully generated with no custom code.
  • bigquery_reservation_basic.tf.tmpl: add labels to the documented sample.
  • resource_bigquery_reservation_test.go.tmpl: add TestAccBigqueryReservation_labels_update covering create → update → import (with ImportStateVerifyIgnore for labels/terraform_labels), following the pattern from #15463 (eventarc channel labels).

Local verification

  • make provider VERSION=ga PRODUCT=bigqueryreservation succeeds; generated diff includes the labels schema, tpgresource.SetLabelsDiff, and labels in the PATCH update mask.
  • go build, go vet, and gofmt pass on the generated google/services/bigqueryreservation package.
bigqueryreservation: added `labels` field to `google_bigquery_reservation` resource

Derived from GoogleCloudPlatform/magic-modules#18412

…on` (#18412)

[upstream:0edf32d45099c6ce16ca78dbbcf77e9654888c3d]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician
modular-magician merged commit 520beb8 into terraform-google-modules:master Aug 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Labels can't be set on google_bigquery_reservation

1 participant