diff --git a/mmv1/products/bigqueryreservation/Reservation.yaml b/mmv1/products/bigqueryreservation/Reservation.yaml index 981fd0eca05a..5438b4f04590 100644 --- a/mmv1/products/bigqueryreservation/Reservation.yaml +++ b/mmv1/products/bigqueryreservation/Reservation.yaml @@ -35,6 +35,13 @@ examples: exclude_docs: true vars: name: my-reservation + - name: bigquery_reservation_with_reservation_group + primary_resource_id: reservation + vars: + group_name: my-group + name: my-reservation + test_env_vars: + project: PROJECT_NAME parameters: - name: location type: String @@ -248,3 +255,6 @@ properties: - autoscale required_with: - scalingMode + - name: reservationGroup + type: String + description: 'Optional. The reservation group that this reservation belongs to. You can set this property when you create or update a reservation. Reservations do not need to belong to a reservation group. Format: projects/{project}/locations/{location}/reservationGroups/{reservation_group} or just {reservation_group}' diff --git a/mmv1/templates/terraform/examples/bigquery_reservation_with_reservation_group.tf.tmpl b/mmv1/templates/terraform/examples/bigquery_reservation_with_reservation_group.tf.tmpl new file mode 100644 index 000000000000..98bb9f5cf49f --- /dev/null +++ b/mmv1/templates/terraform/examples/bigquery_reservation_with_reservation_group.tf.tmpl @@ -0,0 +1,14 @@ +resource "google_bigquery_reservation" "{{$.PrimaryResourceId}}" { + name = "{{index $.Vars "name"}}" + location = "us-west2" + // Set to 0 for testing purposes + // In reality this would be larger than zero + slot_capacity = 0 + edition = "STANDARD" + ignore_idle_slots = true + concurrency = 0 + autoscale { + max_slots = 100 + } + reservation_group = "projects/{{index $.TestEnvVars "project"}}/locations/us-west2/reservationGroups/{{index $.Vars "group_name"}}" +} \ No newline at end of file