Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 2.12 KB

File metadata and controls

71 lines (53 loc) · 2.12 KB
page_title dbtcloud_bigquery_credential Resource - dbtcloud
subcategory
description Bigquery credential resource

dbtcloud_bigquery_credential (Resource)

Bigquery credential resource

Example Usage

resource "dbtcloud_bigquery_credential" "my_credential" {
  project_id  = dbtcloud_project.dbt_project.id
  dataset     = "my_bq_dataset"
  num_threads = 16
}

# When using a global connection with use_latest_adapter = true,
# provide the connection_id to automatically use the correct adapter version
resource "dbtcloud_bigquery_credential" "my_credential_v1" {
  project_id    = dbtcloud_project.dbt_project.id
  dataset       = "my_bq_dataset"
  num_threads   = 16
  connection_id = dbtcloud_global_connection.my_connection.id
}

Schema

Required

  • dataset (String) Default dataset name
  • num_threads (Number) Number of threads to use
  • project_id (Number) Project ID to create the BigQuery credential in

Optional

  • connection_id (Number) The ID of the global connection to use for this credential. When provided, the credential will automatically use the correct adapter version based on the connection's configuration (e.g., bigquery_v1 for connections with use_latest_adapter=true).
  • is_active (Boolean) Whether the BigQuery credential is active
  • resource_metadata (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.

Read-Only

  • credential_id (Number) The internal credential ID
  • id (String) The ID of this resource. Contains the project ID and the credential ID.

Import

Import is supported using the following syntax:

# using  import blocks (requires Terraform >= 1.5)
import {
  to = dbtcloud_bigquery_credential.my_credential
  id = "project_id:credential_id"
}

import {
  to = dbtcloud_bigquery_credential.my_credential
  id = "12345:5678"
}

# using the older import command
terraform import dbtcloud_bigquery_credential.my_credential "project_id:credential_id"
terraform import dbtcloud_bigquery_credential.my_credential 12345:5678