Skip to content

Unable to create global connection with WIF in Bigquery using tf resource #705

Description

@saran-sekar

Describe the bug

I'm trying to create a global connection with WIF Setup in BigQuery using terraform.
The Problem or issue i see here is the parameter oauth_configuration_id isn't found in terraform which configures BigQuery WIF OAuth integration which is required for WIF-based authentication to work in deployment environments.

Right now it is available in DBT APIv3

Hence the connection created is still using WIF but without the link to BigQuery WIF OAuth integration.
So if a profile is created based on the connection, ideally it should use WIF but it uses Service Account JSON as a authentication method in deployment credentials.

Error message

Resource configuration

Below is the tf resource used. Referred the docs from here: https://registry.terraform.io/providers/dbt-labs/dbtcloud/1.11.0/docs/resources/global_connection
Example // BigQuery connection with External OAuth (Workload Identity Federation)

resource "dbtcloud_global_connection" "bigquery_wif" {
name = "project : ${var.gcp_project_id}, env: ${var.environment}"
bigquery = {
gcp_project_id = var.gcp_project_id
application_id = var.oauth_client_id
application_secret = var.oauth_client_secret
deployment_env_auth_type = "external-oauth-wif"
use_latest_adapter = true
job_execution_timeout_seconds = 300

# These fields should not be required for external-oauth-wif will be removed in future versions of the provider,
# but are currently required to create the connection. Placeholder values are used here.
private_key_id              = "placeholder"
private_key                 = "placeholder"
client_email                = "placeholder@example.com"
client_id                   = "placeholder"
auth_uri                    = "https://accounts.google.com/o/oauth2/auth"
token_uri                   = "https://oauth2.googleapis.com/token"
auth_provider_x509_cert_url = "https://www.googleapis.com/oauth2/v1/certs"
client_x509_cert_url        = "https://www.googleapis.com/robot/v1/metadata/x509/placeholder"

}
}

Expected behavior

Config (please complete the following information):

( the version can be retrieved running the command terraform providers )

  • dbt Cloud provider version 1.11.0

I even checked the latest version 1.12.1 (as of day of creation of the issue)
https://registry.terraform.io/providers/dbt-labs/dbtcloud/1.12.1/docs/resources/global_connection#oauth_configuration_id-5

oauth_configuration_id is only supported for snowflake for now.
When can we expect it for bigquery

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions