Skip to content

feat(bigqueryconnection): add configuration block to google_bigquery_connection#1291

Merged
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-c80771e52b89d87a802f3c507b836a0d1614e7b3
Apr 21, 2026
Merged

feat(bigqueryconnection): add configuration block to google_bigquery_connection#1291
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-c80771e52b89d87a802f3c507b836a0d1614e7b3

Conversation

@modular-magician
Copy link
Copy Markdown
Collaborator

Description

This PR adds support for the configuration block (ConnectorConfiguration) to the google_bigquery_connection resource. This enables users to create BigQuery connections using the new Connector framework, which supports AlloyDB, Cloud SQL (MySQL/PostgreSQL), and other connector types.

Background

The BigQuery Connection API v1 supports AlloyDB connections via the ConnectorConfiguration framework (with connector_id: "google-alloydb"), which is a fully typed schema in the Discovery API. However, the Terraform provider currently only supports the legacy connection types (cloud_sql, aws, azure, cloud_spanner, cloud_resource, spark) and does not support the newer configuration field.

Changes

  • Added configuration block to google_bigquery_connection resource in Connection.yaml
    • connector_id (required, immutable) - e.g., google-alloydb
    • endpoint - host/port configuration
    • authentication - username/password or service account
    • network - Private Service Connect configuration
    • asset (required) - database and Google Cloud resource reference
  • Added configuration to exactly_one_of constraint for all existing connection types
  • Added custom flatten template for authentication (password is redacted by the API on read)
  • Added example/test for AlloyDB connection using configuration block

Example Usage

resource "google_bigquery_connection" "alloydb" {
  connection_id = "my-alloydb-connection"
  location      = "us-central1"

  configuration {
    connector_id = "google-alloydb"
    asset {
      database              = "mydb"
      google_cloud_resource = "//alloydb.googleapis.com/projects/my-project/locations/us-central1/clusters/my-cluster/instances/my-instance"
    }
    authentication {
      username_password {
        username = "user"
        password {
          plaintext = "password"
        }
      }
    }
  }
}

Release Note

bigqueryconnection: added `configuration` block to `google_bigquery_connection` resource to support AlloyDB and other connector types via the BigQuery Connector framework

Fixes: hashicorp/terraform-provider-google#18663

Derived from GoogleCloudPlatform/magic-modules#17083

…ry_connection` (#17083)

[upstream:c80771e52b89d87a802f3c507b836a0d1614e7b3]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 75ce06b into terraform-google-modules:master Apr 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable to create BigQuery connection for AlloyDB

1 participant