The BigqueryReservation Assignment resource
resource "google_bigquery_reservation" "basic" {
name = "tf-test-my-reservation%{random_suffix}"
project = "my-project-name"
location = "us-central1"
slot_capacity = 0
ignore_idle_slots = false
}
resource "google_bigquery_reservation_assignment" "primary" {
assignee = "projects/my-project-name"
job_type = "PIPELINE"
reservation = google_bigquery_reservation.basic.id
}
The following arguments are supported:
assignee
-
(Required)
The resource which will use the reservation. E.g. projects/myproject, folders/123, organizations/456.
job_type
-
(Required)
Types of job, which could be specified when using the reservation. Possible values: JOB_TYPE_UNSPECIFIED, PIPELINE, QUERY
reservation
-
(Required)
The reservation for the resource
location
-
(Optional)
The location for the resource
project
-
(Optional)
The project for the resource
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}
name
-
Output only. The resource name of the assignment.
state
-
Assignment will remain in PENDING state if no active capacity commitment is present. It will become ACTIVE when some capacity commitment becomes active. Possible values: STATE_UNSPECIFIED, PENDING, ACTIVE
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.Assignment can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}
{{project}}/{{location}}/{{reservation}}/{{name}}
{{location}}/{{reservation}}/{{name}}
In Terraform v1.5.0 and later, use an import
block to import Assignment using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}"
to = google_bigquery_reservation_assignment.default
}
When using the terraform import
command, Assignment can be imported using one of the formats above. For example:
$ terraform import google_bigquery_reservation_assignment.default projects/{{project}}/locations/{{location}}/reservations/{{reservation}}/assignments/{{name}}
$ terraform import google_bigquery_reservation_assignment.default {{project}}/{{location}}/{{reservation}}/{{name}}
$ terraform import google_bigquery_reservation_assignment.default {{location}}/{{reservation}}/{{name}}