google_bigquery_capacity_commitment

Capacity commitment is a way to purchase compute capacity for BigQuery jobs (in the form of slots) with some committed period of usage. Annual commitments renew by default. Commitments can be removed after their commitment end time passes.

In order to remove annual commitment, its plan needs to be changed to monthly or flex first.

To get more information about CapacityCommitment, see:

Example Usage - Bigquery Reservation Capacity Commitment Docs

resource "google_bigquery_capacity_commitment" "example" {
    capacity_commitment_id = "example-commitment"

    location   = "us-west2"
    slot_count = 100
    plan       = "FLEX_FLAT_RATE"
    edition    = "ENTERPRISE"
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

CapacityCommitment can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import CapacityCommitment using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}"
  to = google_bigquery_capacity_commitment.default
}

When using the terraform import command, CapacityCommitment can be imported using one of the formats above. For example:

$ terraform import google_bigquery_capacity_commitment.default projects/{{project}}/locations/{{location}}/capacityCommitments/{{capacity_commitment_id}}
$ terraform import google_bigquery_capacity_commitment.default {{project}}/{{location}}/{{capacity_commitment_id}}
$ terraform import google_bigquery_capacity_commitment.default {{location}}/{{capacity_commitment_id}}

User Project Overrides

This resource supports User Project Overrides.