1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. bigquery
  6. Connection
Viewing docs for Google Cloud v9.23.0
published on Thursday, May 7, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.23.0
published on Thursday, May 7, 2026 by Pulumi

    A connection allows BigQuery connections to external data sources..

    To get more information about Connection, see:

    Example Usage

    Bigquery Connection Cloud Resource

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "US",
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        cloudResource: {},
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="US",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        cloud_resource={})
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId:  pulumi.String("my-connection"),
    			Location:      pulumi.String("US"),
    			FriendlyName:  pulumi.String("πŸ‘‹"),
    			Description:   pulumi.String("a riveting description"),
    			CloudResource: &bigquery.ConnectionCloudResourceArgs{},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "US",
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            CloudResource = null,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudResourceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var connection = new Connection("connection", ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("US")
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .cloudResource(ConnectionCloudResourceArgs.builder()
                    .build())
                .build());
    
        }
    }
    
    resources:
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: US
          friendlyName: "\U0001F44B"
          description: a riveting description
          cloudResource: {}
    

    Bigquery Connection Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as random from "@pulumi/random";
    
    const instance = new gcp.sql.DatabaseInstance("instance", {
        name: "my-database-instance",
        databaseVersion: "POSTGRES_11",
        region: "us-central1",
        settings: {
            tier: "db-f1-micro",
        },
        deletionProtection: true,
    });
    const db = new gcp.sql.Database("db", {
        instance: instance.name,
        name: "db",
    });
    const pwd = new random.index.Password("pwd", {
        length: 16,
        special: false,
    });
    const user = new gcp.sql.User("user", {
        name: "user",
        instance: instance.name,
        password: pwd.result,
    });
    const connection = new gcp.bigquery.Connection("connection", {
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        location: "US",
        cloudSql: {
            instanceId: instance.connectionName,
            database: db.name,
            type: "POSTGRES",
            credential: {
                username: user.name,
                password: user.password,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_random as random
    
    instance = gcp.sql.DatabaseInstance("instance",
        name="my-database-instance",
        database_version="POSTGRES_11",
        region="us-central1",
        settings={
            "tier": "db-f1-micro",
        },
        deletion_protection=True)
    db = gcp.sql.Database("db",
        instance=instance.name,
        name="db")
    pwd = random.Password("pwd",
        length=16,
        special=False)
    user = gcp.sql.User("user",
        name="user",
        instance=instance.name,
        password=pwd["result"])
    connection = gcp.bigquery.Connection("connection",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        location="US",
        cloud_sql={
            "instance_id": instance.connection_name,
            "database": db.name,
            "type": "POSTGRES",
            "credential": {
                "username": user.name,
                "password": user.password,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/sql"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instance, err := sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
    			Name:            pulumi.String("my-database-instance"),
    			DatabaseVersion: pulumi.String("POSTGRES_11"),
    			Region:          pulumi.String("us-central1"),
    			Settings: &sql.DatabaseInstanceSettingsArgs{
    				Tier: pulumi.String("db-f1-micro"),
    			},
    			DeletionProtection: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		db, err := sql.NewDatabase(ctx, "db", &sql.DatabaseArgs{
    			Instance: instance.Name,
    			Name:     pulumi.String("db"),
    		})
    		if err != nil {
    			return err
    		}
    		pwd, err := random.NewPassword(ctx, "pwd", &random.PasswordArgs{
    			Length:  16,
    			Special: false,
    		})
    		if err != nil {
    			return err
    		}
    		user, err := sql.NewUser(ctx, "user", &sql.UserArgs{
    			Name:     pulumi.String("user"),
    			Instance: instance.Name,
    			Password: pwd.Result,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			Location:     pulumi.String("US"),
    			CloudSql: &bigquery.ConnectionCloudSqlArgs{
    				InstanceId: instance.ConnectionName,
    				Database:   db.Name,
    				Type:       pulumi.String("POSTGRES"),
    				Credential: &bigquery.ConnectionCloudSqlCredentialArgs{
    					Username: user.Name,
    					Password: user.Password,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = new Gcp.Sql.DatabaseInstance("instance", new()
        {
            Name = "my-database-instance",
            DatabaseVersion = "POSTGRES_11",
            Region = "us-central1",
            Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
            {
                Tier = "db-f1-micro",
            },
            DeletionProtection = true,
        });
    
        var db = new Gcp.Sql.Database("db", new()
        {
            Instance = instance.Name,
            Name = "db",
        });
    
        var pwd = new Random.Index.Password("pwd", new()
        {
            Length = 16,
            Special = false,
        });
    
        var user = new Gcp.Sql.User("user", new()
        {
            Name = "user",
            Instance = instance.Name,
            Password = pwd.Result,
        });
    
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            Location = "US",
            CloudSql = new Gcp.BigQuery.Inputs.ConnectionCloudSqlArgs
            {
                InstanceId = instance.ConnectionName,
                Database = db.Name,
                Type = "POSTGRES",
                Credential = new Gcp.BigQuery.Inputs.ConnectionCloudSqlCredentialArgs
                {
                    Username = user.Name,
                    Password = user.Password,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.sql.DatabaseInstance;
    import com.pulumi.gcp.sql.DatabaseInstanceArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
    import com.pulumi.gcp.sql.Database;
    import com.pulumi.gcp.sql.DatabaseArgs;
    import com.pulumi.random.Password;
    import com.pulumi.random.PasswordArgs;
    import com.pulumi.gcp.sql.User;
    import com.pulumi.gcp.sql.UserArgs;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlCredentialArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
                .name("my-database-instance")
                .databaseVersion("POSTGRES_11")
                .region("us-central1")
                .settings(DatabaseInstanceSettingsArgs.builder()
                    .tier("db-f1-micro")
                    .build())
                .deletionProtection(true)
                .build());
    
            var db = new Database("db", DatabaseArgs.builder()
                .instance(instance.name())
                .name("db")
                .build());
    
            var pwd = new Password("pwd", PasswordArgs.builder()
                .length(16)
                .special(false)
                .build());
    
            var user = new User("user", UserArgs.builder()
                .name("user")
                .instance(instance.name())
                .password(pwd.result())
                .build());
    
            var connection = new Connection("connection", ConnectionArgs.builder()
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .location("US")
                .cloudSql(ConnectionCloudSqlArgs.builder()
                    .instanceId(instance.connectionName())
                    .database(db.name())
                    .type("POSTGRES")
                    .credential(ConnectionCloudSqlCredentialArgs.builder()
                        .username(user.name())
                        .password(user.password())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      instance:
        type: gcp:sql:DatabaseInstance
        properties:
          name: my-database-instance
          databaseVersion: POSTGRES_11
          region: us-central1
          settings:
            tier: db-f1-micro
          deletionProtection: true
      db:
        type: gcp:sql:Database
        properties:
          instance: ${instance.name}
          name: db
      pwd:
        type: random:Password
        properties:
          length: 16
          special: false
      user:
        type: gcp:sql:User
        properties:
          name: user
          instance: ${instance.name}
          password: ${pwd.result}
      connection:
        type: gcp:bigquery:Connection
        properties:
          friendlyName: "\U0001F44B"
          description: a riveting description
          location: US
          cloudSql:
            instanceId: ${instance.connectionName}
            database: ${db.name}
            type: POSTGRES
            credential:
              username: ${user.name}
              password: ${user.password}
    

    Bigquery Connection Full

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as random from "@pulumi/random";
    
    const instance = new gcp.sql.DatabaseInstance("instance", {
        name: "my-database-instance",
        databaseVersion: "POSTGRES_11",
        region: "us-central1",
        settings: {
            tier: "db-f1-micro",
        },
        deletionProtection: true,
    });
    const db = new gcp.sql.Database("db", {
        instance: instance.name,
        name: "db",
    });
    const pwd = new random.index.Password("pwd", {
        length: 16,
        special: false,
    });
    const user = new gcp.sql.User("user", {
        name: "user",
        instance: instance.name,
        password: pwd.result,
    });
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "US",
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        cloudSql: {
            instanceId: instance.connectionName,
            database: db.name,
            type: "POSTGRES",
            credential: {
                username: user.name,
                password: user.password,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_random as random
    
    instance = gcp.sql.DatabaseInstance("instance",
        name="my-database-instance",
        database_version="POSTGRES_11",
        region="us-central1",
        settings={
            "tier": "db-f1-micro",
        },
        deletion_protection=True)
    db = gcp.sql.Database("db",
        instance=instance.name,
        name="db")
    pwd = random.Password("pwd",
        length=16,
        special=False)
    user = gcp.sql.User("user",
        name="user",
        instance=instance.name,
        password=pwd["result"])
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="US",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        cloud_sql={
            "instance_id": instance.connection_name,
            "database": db.name,
            "type": "POSTGRES",
            "credential": {
                "username": user.name,
                "password": user.password,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/sql"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instance, err := sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
    			Name:            pulumi.String("my-database-instance"),
    			DatabaseVersion: pulumi.String("POSTGRES_11"),
    			Region:          pulumi.String("us-central1"),
    			Settings: &sql.DatabaseInstanceSettingsArgs{
    				Tier: pulumi.String("db-f1-micro"),
    			},
    			DeletionProtection: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		db, err := sql.NewDatabase(ctx, "db", &sql.DatabaseArgs{
    			Instance: instance.Name,
    			Name:     pulumi.String("db"),
    		})
    		if err != nil {
    			return err
    		}
    		pwd, err := random.NewPassword(ctx, "pwd", &random.PasswordArgs{
    			Length:  16,
    			Special: false,
    		})
    		if err != nil {
    			return err
    		}
    		user, err := sql.NewUser(ctx, "user", &sql.UserArgs{
    			Name:     pulumi.String("user"),
    			Instance: instance.Name,
    			Password: pwd.Result,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId: pulumi.String("my-connection"),
    			Location:     pulumi.String("US"),
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			CloudSql: &bigquery.ConnectionCloudSqlArgs{
    				InstanceId: instance.ConnectionName,
    				Database:   db.Name,
    				Type:       pulumi.String("POSTGRES"),
    				Credential: &bigquery.ConnectionCloudSqlCredentialArgs{
    					Username: user.Name,
    					Password: user.Password,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = new Gcp.Sql.DatabaseInstance("instance", new()
        {
            Name = "my-database-instance",
            DatabaseVersion = "POSTGRES_11",
            Region = "us-central1",
            Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
            {
                Tier = "db-f1-micro",
            },
            DeletionProtection = true,
        });
    
        var db = new Gcp.Sql.Database("db", new()
        {
            Instance = instance.Name,
            Name = "db",
        });
    
        var pwd = new Random.Index.Password("pwd", new()
        {
            Length = 16,
            Special = false,
        });
    
        var user = new Gcp.Sql.User("user", new()
        {
            Name = "user",
            Instance = instance.Name,
            Password = pwd.Result,
        });
    
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "US",
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            CloudSql = new Gcp.BigQuery.Inputs.ConnectionCloudSqlArgs
            {
                InstanceId = instance.ConnectionName,
                Database = db.Name,
                Type = "POSTGRES",
                Credential = new Gcp.BigQuery.Inputs.ConnectionCloudSqlCredentialArgs
                {
                    Username = user.Name,
                    Password = user.Password,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.sql.DatabaseInstance;
    import com.pulumi.gcp.sql.DatabaseInstanceArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
    import com.pulumi.gcp.sql.Database;
    import com.pulumi.gcp.sql.DatabaseArgs;
    import com.pulumi.random.Password;
    import com.pulumi.random.PasswordArgs;
    import com.pulumi.gcp.sql.User;
    import com.pulumi.gcp.sql.UserArgs;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlCredentialArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
                .name("my-database-instance")
                .databaseVersion("POSTGRES_11")
                .region("us-central1")
                .settings(DatabaseInstanceSettingsArgs.builder()
                    .tier("db-f1-micro")
                    .build())
                .deletionProtection(true)
                .build());
    
            var db = new Database("db", DatabaseArgs.builder()
                .instance(instance.name())
                .name("db")
                .build());
    
            var pwd = new Password("pwd", PasswordArgs.builder()
                .length(16)
                .special(false)
                .build());
    
            var user = new User("user", UserArgs.builder()
                .name("user")
                .instance(instance.name())
                .password(pwd.result())
                .build());
    
            var connection = new Connection("connection", ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("US")
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .cloudSql(ConnectionCloudSqlArgs.builder()
                    .instanceId(instance.connectionName())
                    .database(db.name())
                    .type("POSTGRES")
                    .credential(ConnectionCloudSqlCredentialArgs.builder()
                        .username(user.name())
                        .password(user.password())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      instance:
        type: gcp:sql:DatabaseInstance
        properties:
          name: my-database-instance
          databaseVersion: POSTGRES_11
          region: us-central1
          settings:
            tier: db-f1-micro
          deletionProtection: true
      db:
        type: gcp:sql:Database
        properties:
          instance: ${instance.name}
          name: db
      pwd:
        type: random:Password
        properties:
          length: 16
          special: false
      user:
        type: gcp:sql:User
        properties:
          name: user
          instance: ${instance.name}
          password: ${pwd.result}
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: US
          friendlyName: "\U0001F44B"
          description: a riveting description
          cloudSql:
            instanceId: ${instance.connectionName}
            database: ${db.name}
            type: POSTGRES
            credential:
              username: ${user.name}
              password: ${user.password}
    

    Bigquery Connection Aws

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "aws-us-east-1",
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        aws: {
            accessRole: {
                iamRoleId: "arn:aws:iam::999999999999:role/omnirole",
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="aws-us-east-1",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        aws={
            "access_role": {
                "iam_role_id": "arn:aws:iam::999999999999:role/omnirole",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId: pulumi.String("my-connection"),
    			Location:     pulumi.String("aws-us-east-1"),
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			Aws: &bigquery.ConnectionAwsArgs{
    				AccessRole: &bigquery.ConnectionAwsAccessRoleArgs{
    					IamRoleId: pulumi.String("arn:aws:iam::999999999999:role/omnirole"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "aws-us-east-1",
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            Aws = new Gcp.BigQuery.Inputs.ConnectionAwsArgs
            {
                AccessRole = new Gcp.BigQuery.Inputs.ConnectionAwsAccessRoleArgs
                {
                    IamRoleId = "arn:aws:iam::999999999999:role/omnirole",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionAwsArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionAwsAccessRoleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var connection = new Connection("connection", ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("aws-us-east-1")
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .aws(ConnectionAwsArgs.builder()
                    .accessRole(ConnectionAwsAccessRoleArgs.builder()
                        .iamRoleId("arn:aws:iam::999999999999:role/omnirole")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: aws-us-east-1
          friendlyName: "\U0001F44B"
          description: a riveting description
          aws:
            accessRole:
              iamRoleId: arn:aws:iam::999999999999:role/omnirole
    

    Bigquery Connection Azure

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "azure-eastus2",
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        azure: {
            customerTenantId: "customer-tenant-id",
            federatedApplicationClientId: "b43eeeee-eeee-eeee-eeee-a480155501ce",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="azure-eastus2",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        azure={
            "customer_tenant_id": "customer-tenant-id",
            "federated_application_client_id": "b43eeeee-eeee-eeee-eeee-a480155501ce",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId: pulumi.String("my-connection"),
    			Location:     pulumi.String("azure-eastus2"),
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			Azure: &bigquery.ConnectionAzureArgs{
    				CustomerTenantId:             pulumi.String("customer-tenant-id"),
    				FederatedApplicationClientId: pulumi.String("b43eeeee-eeee-eeee-eeee-a480155501ce"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "azure-eastus2",
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            Azure = new Gcp.BigQuery.Inputs.ConnectionAzureArgs
            {
                CustomerTenantId = "customer-tenant-id",
                FederatedApplicationClientId = "b43eeeee-eeee-eeee-eeee-a480155501ce",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionAzureArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var connection = new Connection("connection", ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("azure-eastus2")
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .azure(ConnectionAzureArgs.builder()
                    .customerTenantId("customer-tenant-id")
                    .federatedApplicationClientId("b43eeeee-eeee-eeee-eeee-a480155501ce")
                    .build())
                .build());
    
        }
    }
    
    resources:
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: azure-eastus2
          friendlyName: "\U0001F44B"
          description: a riveting description
          azure:
            customerTenantId: customer-tenant-id
            federatedApplicationClientId: b43eeeee-eeee-eeee-eeee-a480155501ce
    

    Bigquery Connection Cloudspanner

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "US",
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        cloudSpanner: {
            database: "projects/project/instances/instance/databases/database",
            databaseRole: "database_role",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="US",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        cloud_spanner={
            "database": "projects/project/instances/instance/databases/database",
            "database_role": "database_role",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId: pulumi.String("my-connection"),
    			Location:     pulumi.String("US"),
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			CloudSpanner: &bigquery.ConnectionCloudSpannerArgs{
    				Database:     pulumi.String("projects/project/instances/instance/databases/database"),
    				DatabaseRole: pulumi.String("database_role"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "US",
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            CloudSpanner = new Gcp.BigQuery.Inputs.ConnectionCloudSpannerArgs
            {
                Database = "projects/project/instances/instance/databases/database",
                DatabaseRole = "database_role",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSpannerArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var connection = new Connection("connection", ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("US")
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .cloudSpanner(ConnectionCloudSpannerArgs.builder()
                    .database("projects/project/instances/instance/databases/database")
                    .databaseRole("database_role")
                    .build())
                .build());
    
        }
    }
    
    resources:
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: US
          friendlyName: "\U0001F44B"
          description: a riveting description
          cloudSpanner:
            database: projects/project/instances/instance/databases/database
            databaseRole: database_role
    

    Bigquery Connection Cloudspanner Databoost

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "US",
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        cloudSpanner: {
            database: "projects/project/instances/instance/databases/database",
            useParallelism: true,
            useDataBoost: true,
            maxParallelism: 100,
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="US",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        cloud_spanner={
            "database": "projects/project/instances/instance/databases/database",
            "use_parallelism": True,
            "use_data_boost": True,
            "max_parallelism": 100,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId: pulumi.String("my-connection"),
    			Location:     pulumi.String("US"),
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			CloudSpanner: &bigquery.ConnectionCloudSpannerArgs{
    				Database:       pulumi.String("projects/project/instances/instance/databases/database"),
    				UseParallelism: pulumi.Bool(true),
    				UseDataBoost:   pulumi.Bool(true),
    				MaxParallelism: pulumi.Int(100),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "US",
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            CloudSpanner = new Gcp.BigQuery.Inputs.ConnectionCloudSpannerArgs
            {
                Database = "projects/project/instances/instance/databases/database",
                UseParallelism = true,
                UseDataBoost = true,
                MaxParallelism = 100,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSpannerArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var connection = new Connection("connection", ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("US")
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .cloudSpanner(ConnectionCloudSpannerArgs.builder()
                    .database("projects/project/instances/instance/databases/database")
                    .useParallelism(true)
                    .useDataBoost(true)
                    .maxParallelism(100)
                    .build())
                .build());
    
        }
    }
    
    resources:
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: US
          friendlyName: "\U0001F44B"
          description: a riveting description
          cloudSpanner:
            database: projects/project/instances/instance/databases/database
            useParallelism: true
            useDataBoost: true
            maxParallelism: 100
    

    Bigquery Connection Spark

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const basic = new gcp.dataproc.Cluster("basic", {
        name: "my-connection",
        region: "us-central1",
        clusterConfig: {
            softwareConfig: {
                overrideProperties: {
                    "dataproc:dataproc.allow.zero.workers": "true",
                },
            },
            masterConfig: {
                numInstances: 1,
                machineType: "e2-standard-2",
                diskConfig: {
                    bootDiskSizeGb: 35,
                },
            },
        },
    });
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "US",
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        spark: {
            sparkHistoryServerConfig: {
                dataprocCluster: basic.id,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    basic = gcp.dataproc.Cluster("basic",
        name="my-connection",
        region="us-central1",
        cluster_config={
            "software_config": {
                "override_properties": {
                    "dataproc:dataproc.allow.zero.workers": "true",
                },
            },
            "master_config": {
                "num_instances": 1,
                "machine_type": "e2-standard-2",
                "disk_config": {
                    "boot_disk_size_gb": 35,
                },
            },
        })
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="US",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        spark={
            "spark_history_server_config": {
                "dataproc_cluster": basic.id,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/dataproc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		basic, err := dataproc.NewCluster(ctx, "basic", &dataproc.ClusterArgs{
    			Name:   pulumi.String("my-connection"),
    			Region: pulumi.String("us-central1"),
    			ClusterConfig: &dataproc.ClusterClusterConfigArgs{
    				SoftwareConfig: &dataproc.ClusterClusterConfigSoftwareConfigArgs{
    					OverrideProperties: pulumi.StringMap{
    						"dataproc:dataproc.allow.zero.workers": pulumi.String("true"),
    					},
    				},
    				MasterConfig: &dataproc.ClusterClusterConfigMasterConfigArgs{
    					NumInstances: pulumi.Int(1),
    					MachineType:  pulumi.String("e2-standard-2"),
    					DiskConfig: &dataproc.ClusterClusterConfigMasterConfigDiskConfigArgs{
    						BootDiskSizeGb: pulumi.Int(35),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId: pulumi.String("my-connection"),
    			Location:     pulumi.String("US"),
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			Spark: &bigquery.ConnectionSparkArgs{
    				SparkHistoryServerConfig: &bigquery.ConnectionSparkSparkHistoryServerConfigArgs{
    					DataprocCluster: basic.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var basic = new Gcp.Dataproc.Cluster("basic", new()
        {
            Name = "my-connection",
            Region = "us-central1",
            ClusterConfig = new Gcp.Dataproc.Inputs.ClusterClusterConfigArgs
            {
                SoftwareConfig = new Gcp.Dataproc.Inputs.ClusterClusterConfigSoftwareConfigArgs
                {
                    OverrideProperties = 
                    {
                        { "dataproc:dataproc.allow.zero.workers", "true" },
                    },
                },
                MasterConfig = new Gcp.Dataproc.Inputs.ClusterClusterConfigMasterConfigArgs
                {
                    NumInstances = 1,
                    MachineType = "e2-standard-2",
                    DiskConfig = new Gcp.Dataproc.Inputs.ClusterClusterConfigMasterConfigDiskConfigArgs
                    {
                        BootDiskSizeGb = 35,
                    },
                },
            },
        });
    
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "US",
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            Spark = new Gcp.BigQuery.Inputs.ConnectionSparkArgs
            {
                SparkHistoryServerConfig = new Gcp.BigQuery.Inputs.ConnectionSparkSparkHistoryServerConfigArgs
                {
                    DataprocCluster = basic.Id,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.dataproc.Cluster;
    import com.pulumi.gcp.dataproc.ClusterArgs;
    import com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigArgs;
    import com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigSoftwareConfigArgs;
    import com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigMasterConfigArgs;
    import com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigMasterConfigDiskConfigArgs;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionSparkArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionSparkSparkHistoryServerConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var basic = new Cluster("basic", ClusterArgs.builder()
                .name("my-connection")
                .region("us-central1")
                .clusterConfig(ClusterClusterConfigArgs.builder()
                    .softwareConfig(ClusterClusterConfigSoftwareConfigArgs.builder()
                        .overrideProperties(Map.of("dataproc:dataproc.allow.zero.workers", "true"))
                        .build())
                    .masterConfig(ClusterClusterConfigMasterConfigArgs.builder()
                        .numInstances(1)
                        .machineType("e2-standard-2")
                        .diskConfig(ClusterClusterConfigMasterConfigDiskConfigArgs.builder()
                            .bootDiskSizeGb(35)
                            .build())
                        .build())
                    .build())
                .build());
    
            var connection = new Connection("connection", ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("US")
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .spark(ConnectionSparkArgs.builder()
                    .sparkHistoryServerConfig(ConnectionSparkSparkHistoryServerConfigArgs.builder()
                        .dataprocCluster(basic.id())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: US
          friendlyName: "\U0001F44B"
          description: a riveting description
          spark:
            sparkHistoryServerConfig:
              dataprocCluster: ${basic.id}
      basic:
        type: gcp:dataproc:Cluster
        properties:
          name: my-connection
          region: us-central1
          clusterConfig:
            softwareConfig:
              overrideProperties:
                dataproc:dataproc.allow.zero.workers: 'true'
            masterConfig:
              numInstances: 1
              machineType: e2-standard-2
              diskConfig:
                bootDiskSizeGb: 35
    

    Bigquery Connection Sql With Cmek

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const instance = new gcp.sql.DatabaseInstance("instance", {
        name: "my-database-instance",
        region: "us-central1",
        databaseVersion: "POSTGRES_11",
        settings: {
            tier: "db-f1-micro",
        },
        deletionProtection: true,
    });
    const db = new gcp.sql.Database("db", {
        instance: instance.name,
        name: "db",
    });
    const user = new gcp.sql.User("user", {
        name: "user",
        instance: instance.name,
        password: "tf-test-my-password_15222",
    });
    const bq_connection_cmek = new gcp.bigquery.Connection("bq-connection-cmek", {
        friendlyName: "πŸ‘‹",
        description: "a riveting description",
        location: "US",
        kmsKeyName: "projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key",
        cloudSql: {
            instanceId: instance.connectionName,
            database: db.name,
            type: "POSTGRES",
            credential: {
                username: user.name,
                password: user.password,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    instance = gcp.sql.DatabaseInstance("instance",
        name="my-database-instance",
        region="us-central1",
        database_version="POSTGRES_11",
        settings={
            "tier": "db-f1-micro",
        },
        deletion_protection=True)
    db = gcp.sql.Database("db",
        instance=instance.name,
        name="db")
    user = gcp.sql.User("user",
        name="user",
        instance=instance.name,
        password="tf-test-my-password_15222")
    bq_connection_cmek = gcp.bigquery.Connection("bq-connection-cmek",
        friendly_name="πŸ‘‹",
        description="a riveting description",
        location="US",
        kms_key_name="projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key",
        cloud_sql={
            "instance_id": instance.connection_name,
            "database": db.name,
            "type": "POSTGRES",
            "credential": {
                "username": user.name,
                "password": user.password,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/sql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instance, err := sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
    			Name:            pulumi.String("my-database-instance"),
    			Region:          pulumi.String("us-central1"),
    			DatabaseVersion: pulumi.String("POSTGRES_11"),
    			Settings: &sql.DatabaseInstanceSettingsArgs{
    				Tier: pulumi.String("db-f1-micro"),
    			},
    			DeletionProtection: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		db, err := sql.NewDatabase(ctx, "db", &sql.DatabaseArgs{
    			Instance: instance.Name,
    			Name:     pulumi.String("db"),
    		})
    		if err != nil {
    			return err
    		}
    		user, err := sql.NewUser(ctx, "user", &sql.UserArgs{
    			Name:     pulumi.String("user"),
    			Instance: instance.Name,
    			Password: pulumi.String("tf-test-my-password_15222"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bigquery.NewConnection(ctx, "bq-connection-cmek", &bigquery.ConnectionArgs{
    			FriendlyName: pulumi.String("πŸ‘‹"),
    			Description:  pulumi.String("a riveting description"),
    			Location:     pulumi.String("US"),
    			KmsKeyName:   pulumi.String("projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key"),
    			CloudSql: &bigquery.ConnectionCloudSqlArgs{
    				InstanceId: instance.ConnectionName,
    				Database:   db.Name,
    				Type:       pulumi.String("POSTGRES"),
    				Credential: &bigquery.ConnectionCloudSqlCredentialArgs{
    					Username: user.Name,
    					Password: user.Password,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = new Gcp.Sql.DatabaseInstance("instance", new()
        {
            Name = "my-database-instance",
            Region = "us-central1",
            DatabaseVersion = "POSTGRES_11",
            Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
            {
                Tier = "db-f1-micro",
            },
            DeletionProtection = true,
        });
    
        var db = new Gcp.Sql.Database("db", new()
        {
            Instance = instance.Name,
            Name = "db",
        });
    
        var user = new Gcp.Sql.User("user", new()
        {
            Name = "user",
            Instance = instance.Name,
            Password = "tf-test-my-password_15222",
        });
    
        var bq_connection_cmek = new Gcp.BigQuery.Connection("bq-connection-cmek", new()
        {
            FriendlyName = "πŸ‘‹",
            Description = "a riveting description",
            Location = "US",
            KmsKeyName = "projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key",
            CloudSql = new Gcp.BigQuery.Inputs.ConnectionCloudSqlArgs
            {
                InstanceId = instance.ConnectionName,
                Database = db.Name,
                Type = "POSTGRES",
                Credential = new Gcp.BigQuery.Inputs.ConnectionCloudSqlCredentialArgs
                {
                    Username = user.Name,
                    Password = user.Password,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.sql.DatabaseInstance;
    import com.pulumi.gcp.sql.DatabaseInstanceArgs;
    import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
    import com.pulumi.gcp.sql.Database;
    import com.pulumi.gcp.sql.DatabaseArgs;
    import com.pulumi.gcp.sql.User;
    import com.pulumi.gcp.sql.UserArgs;
    import com.pulumi.gcp.bigquery.Connection;
    import com.pulumi.gcp.bigquery.ConnectionArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionCloudSqlCredentialArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
                .name("my-database-instance")
                .region("us-central1")
                .databaseVersion("POSTGRES_11")
                .settings(DatabaseInstanceSettingsArgs.builder()
                    .tier("db-f1-micro")
                    .build())
                .deletionProtection(true)
                .build());
    
            var db = new Database("db", DatabaseArgs.builder()
                .instance(instance.name())
                .name("db")
                .build());
    
            var user = new User("user", UserArgs.builder()
                .name("user")
                .instance(instance.name())
                .password("tf-test-my-password_15222")
                .build());
    
            var bq_connection_cmek = new Connection("bq-connection-cmek", ConnectionArgs.builder()
                .friendlyName("πŸ‘‹")
                .description("a riveting description")
                .location("US")
                .kmsKeyName("projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key")
                .cloudSql(ConnectionCloudSqlArgs.builder()
                    .instanceId(instance.connectionName())
                    .database(db.name())
                    .type("POSTGRES")
                    .credential(ConnectionCloudSqlCredentialArgs.builder()
                        .username(user.name())
                        .password(user.password())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      instance:
        type: gcp:sql:DatabaseInstance
        properties:
          name: my-database-instance
          region: us-central1
          databaseVersion: POSTGRES_11
          settings:
            tier: db-f1-micro
          deletionProtection: true
      db:
        type: gcp:sql:Database
        properties:
          instance: ${instance.name}
          name: db
      user:
        type: gcp:sql:User
        properties:
          name: user
          instance: ${instance.name}
          password: tf-test-my-password_15222
      bq-connection-cmek:
        type: gcp:bigquery:Connection
        properties:
          friendlyName: "\U0001F44B"
          description: a riveting description
          location: US
          kmsKeyName: projects/project/locations/us-central1/keyRings/us-central1/cryptoKeys/bq-key
          cloudSql:
            instanceId: ${instance.connectionName}
            database: ${db.name}
            type: POSTGRES
            credential:
              username: ${user.name}
              password: ${user.password}
    

    Bigquery Connection Connector Configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const nameSuffix = "my-connection";
    const defaultNetwork = new gcp.compute.Network("default", {name: `alloydb-network-${nameSuffix}`});
    const _default = new gcp.alloydb.Cluster("default", {
        clusterId: `alloydb-cluster-${nameSuffix}`,
        location: "us-central1",
        networkConfig: {
            network: defaultNetwork.id,
        },
        initialUser: {
            password: "alloydb-cluster-password",
        },
        deletionProtection: false,
    });
    const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
        name: `alloydb-ip-${nameSuffix}`,
        addressType: "INTERNAL",
        purpose: "VPC_PEERING",
        prefixLength: 16,
        network: defaultNetwork.id,
    });
    const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
        network: defaultNetwork.id,
        service: "servicenetworking.googleapis.com",
        reservedPeeringRanges: [privateIpAlloc.name],
    });
    const defaultInstance = new gcp.alloydb.Instance("default", {
        cluster: _default.name,
        instanceId: `alloydb-instance-${nameSuffix}`,
        instanceType: "PRIMARY",
        machineConfig: {
            cpuCount: 2,
        },
    }, {
        dependsOn: [vpcConnection],
    });
    const connection = new gcp.bigquery.Connection("connection", {
        connectionId: "my-connection",
        location: "us-central1",
        friendlyName: "alloydb connection",
        description: "AlloyDB connection using connector configuration",
        configuration: {
            connectorId: "google-alloydb",
            asset: {
                database: "postgres",
                googleCloudResource: pulumi.interpolate`//alloydb.googleapis.com/${defaultInstance.id}`,
            },
            authentication: {
                usernamePassword: {
                    username: "user",
                    password: {
                        plaintext: "password",
                    },
                },
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    name_suffix = "my-connection"
    default_network = gcp.compute.Network("default", name=f"alloydb-network-{name_suffix}")
    default = gcp.alloydb.Cluster("default",
        cluster_id=f"alloydb-cluster-{name_suffix}",
        location="us-central1",
        network_config={
            "network": default_network.id,
        },
        initial_user={
            "password": "alloydb-cluster-password",
        },
        deletion_protection=False)
    private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
        name=f"alloydb-ip-{name_suffix}",
        address_type="INTERNAL",
        purpose="VPC_PEERING",
        prefix_length=16,
        network=default_network.id)
    vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
        network=default_network.id,
        service="servicenetworking.googleapis.com",
        reserved_peering_ranges=[private_ip_alloc.name])
    default_instance = gcp.alloydb.Instance("default",
        cluster=default.name,
        instance_id=f"alloydb-instance-{name_suffix}",
        instance_type="PRIMARY",
        machine_config={
            "cpu_count": 2,
        },
        opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
    connection = gcp.bigquery.Connection("connection",
        connection_id="my-connection",
        location="us-central1",
        friendly_name="alloydb connection",
        description="AlloyDB connection using connector configuration",
        configuration={
            "connector_id": "google-alloydb",
            "asset": {
                "database": "postgres",
                "google_cloud_resource": default_instance.id.apply(lambda id: f"//alloydb.googleapis.com/{id}"),
            },
            "authentication": {
                "username_password": {
                    "username": "user",
                    "password": {
                        "plaintext": "password",
                    },
                },
            },
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/alloydb"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/servicenetworking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		nameSuffix := "my-connection"
    		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
    			Name: pulumi.Sprintf("alloydb-network-%v", nameSuffix),
    		})
    		if err != nil {
    			return err
    		}
    		_default, err := alloydb.NewCluster(ctx, "default", &alloydb.ClusterArgs{
    			ClusterId: pulumi.Sprintf("alloydb-cluster-%v", nameSuffix),
    			Location:  pulumi.String("us-central1"),
    			NetworkConfig: &alloydb.ClusterNetworkConfigArgs{
    				Network: defaultNetwork.ID(),
    			},
    			InitialUser: &alloydb.ClusterInitialUserArgs{
    				Password: pulumi.String("alloydb-cluster-password"),
    			},
    			DeletionProtection: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
    			Name:         pulumi.Sprintf("alloydb-ip-%v", nameSuffix),
    			AddressType:  pulumi.String("INTERNAL"),
    			Purpose:      pulumi.String("VPC_PEERING"),
    			PrefixLength: pulumi.Int(16),
    			Network:      defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		vpcConnection, err := servicenetworking.NewConnection(ctx, "vpc_connection", &servicenetworking.ConnectionArgs{
    			Network: defaultNetwork.ID(),
    			Service: pulumi.String("servicenetworking.googleapis.com"),
    			ReservedPeeringRanges: pulumi.StringArray{
    				privateIpAlloc.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := alloydb.NewInstance(ctx, "default", &alloydb.InstanceArgs{
    			Cluster:      _default.Name,
    			InstanceId:   pulumi.Sprintf("alloydb-instance-%v", nameSuffix),
    			InstanceType: pulumi.String("PRIMARY"),
    			MachineConfig: &alloydb.InstanceMachineConfigArgs{
    				CpuCount: pulumi.Int(2),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			vpcConnection,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = bigquery.NewConnection(ctx, "connection", &bigquery.ConnectionArgs{
    			ConnectionId: pulumi.String("my-connection"),
    			Location:     pulumi.String("us-central1"),
    			FriendlyName: pulumi.String("alloydb connection"),
    			Description:  pulumi.String("AlloyDB connection using connector configuration"),
    			Configuration: &bigquery.ConnectionConfigurationArgs{
    				ConnectorId: pulumi.String("google-alloydb"),
    				Asset: &bigquery.ConnectionConfigurationAssetArgs{
    					Database: pulumi.String("postgres"),
    					GoogleCloudResource: defaultInstance.ID().ApplyT(func(id string) (string, error) {
    						return fmt.Sprintf("//alloydb.googleapis.com/%v", id), nil
    					}).(pulumi.StringOutput),
    				},
    				Authentication: &bigquery.ConnectionConfigurationAuthenticationArgs{
    					UsernamePassword: &bigquery.ConnectionConfigurationAuthenticationUsernamePasswordArgs{
    						Username: pulumi.String("user"),
    						Password: &bigquery.ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs{
    							Plaintext: pulumi.String("password"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var nameSuffix = "my-connection";
    
        var defaultNetwork = new Gcp.Compute.Network("default", new()
        {
            Name = $"alloydb-network-{nameSuffix}",
        });
    
        var @default = new Gcp.Alloydb.Cluster("default", new()
        {
            ClusterId = $"alloydb-cluster-{nameSuffix}",
            Location = "us-central1",
            NetworkConfig = new Gcp.Alloydb.Inputs.ClusterNetworkConfigArgs
            {
                Network = defaultNetwork.Id,
            },
            InitialUser = new Gcp.Alloydb.Inputs.ClusterInitialUserArgs
            {
                Password = "alloydb-cluster-password",
            },
            DeletionProtection = false,
        });
    
        var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
        {
            Name = $"alloydb-ip-{nameSuffix}",
            AddressType = "INTERNAL",
            Purpose = "VPC_PEERING",
            PrefixLength = 16,
            Network = defaultNetwork.Id,
        });
    
        var vpcConnection = new Gcp.ServiceNetworking.Connection("vpc_connection", new()
        {
            Network = defaultNetwork.Id,
            Service = "servicenetworking.googleapis.com",
            ReservedPeeringRanges = new[]
            {
                privateIpAlloc.Name,
            },
        });
    
        var defaultInstance = new Gcp.Alloydb.Instance("default", new()
        {
            Cluster = @default.Name,
            InstanceId = $"alloydb-instance-{nameSuffix}",
            InstanceType = "PRIMARY",
            MachineConfig = new Gcp.Alloydb.Inputs.InstanceMachineConfigArgs
            {
                CpuCount = 2,
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                vpcConnection,
            },
        });
    
        var connection = new Gcp.BigQuery.Connection("connection", new()
        {
            ConnectionId = "my-connection",
            Location = "us-central1",
            FriendlyName = "alloydb connection",
            Description = "AlloyDB connection using connector configuration",
            Configuration = new Gcp.BigQuery.Inputs.ConnectionConfigurationArgs
            {
                ConnectorId = "google-alloydb",
                Asset = new Gcp.BigQuery.Inputs.ConnectionConfigurationAssetArgs
                {
                    Database = "postgres",
                    GoogleCloudResource = defaultInstance.Id.Apply(id => $"//alloydb.googleapis.com/{id}"),
                },
                Authentication = new Gcp.BigQuery.Inputs.ConnectionConfigurationAuthenticationArgs
                {
                    UsernamePassword = new Gcp.BigQuery.Inputs.ConnectionConfigurationAuthenticationUsernamePasswordArgs
                    {
                        Username = "user",
                        Password = new Gcp.BigQuery.Inputs.ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs
                        {
                            Plaintext = "password",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.alloydb.Cluster;
    import com.pulumi.gcp.alloydb.ClusterArgs;
    import com.pulumi.gcp.alloydb.inputs.ClusterNetworkConfigArgs;
    import com.pulumi.gcp.alloydb.inputs.ClusterInitialUserArgs;
    import com.pulumi.gcp.compute.GlobalAddress;
    import com.pulumi.gcp.compute.GlobalAddressArgs;
    import com.pulumi.gcp.alloydb.Instance;
    import com.pulumi.gcp.alloydb.InstanceArgs;
    import com.pulumi.gcp.alloydb.inputs.InstanceMachineConfigArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionConfigurationArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionConfigurationAssetArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionConfigurationAuthenticationArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionConfigurationAuthenticationUsernamePasswordArgs;
    import com.pulumi.gcp.bigquery.inputs.ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var nameSuffix = "my-connection";
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .name(String.format("alloydb-network-%s", nameSuffix))
                .build());
    
            var default_ = new Cluster("default", ClusterArgs.builder()
                .clusterId(String.format("alloydb-cluster-%s", nameSuffix))
                .location("us-central1")
                .networkConfig(ClusterNetworkConfigArgs.builder()
                    .network(defaultNetwork.id())
                    .build())
                .initialUser(ClusterInitialUserArgs.builder()
                    .password("alloydb-cluster-password")
                    .build())
                .deletionProtection(false)
                .build());
    
            var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
                .name(String.format("alloydb-ip-%s", nameSuffix))
                .addressType("INTERNAL")
                .purpose("VPC_PEERING")
                .prefixLength(16)
                .network(defaultNetwork.id())
                .build());
    
            var vpcConnection = new com.pulumi.gcp.servicenetworking.Connection("vpcConnection", com.pulumi.gcp.servicenetworking.ConnectionArgs.builder()
                .network(defaultNetwork.id())
                .service("servicenetworking.googleapis.com")
                .reservedPeeringRanges(privateIpAlloc.name())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .cluster(default_.name())
                .instanceId(String.format("alloydb-instance-%s", nameSuffix))
                .instanceType("PRIMARY")
                .machineConfig(InstanceMachineConfigArgs.builder()
                    .cpuCount(2)
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(vpcConnection)
                    .build());
    
            var connection = new com.pulumi.gcp.bigquery.Connection("connection", com.pulumi.gcp.bigquery.ConnectionArgs.builder()
                .connectionId("my-connection")
                .location("us-central1")
                .friendlyName("alloydb connection")
                .description("AlloyDB connection using connector configuration")
                .configuration(ConnectionConfigurationArgs.builder()
                    .connectorId("google-alloydb")
                    .asset(ConnectionConfigurationAssetArgs.builder()
                        .database("postgres")
                        .googleCloudResource(defaultInstance.id().applyValue(_id -> String.format("//alloydb.googleapis.com/%s", _id)))
                        .build())
                    .authentication(ConnectionConfigurationAuthenticationArgs.builder()
                        .usernamePassword(ConnectionConfigurationAuthenticationUsernamePasswordArgs.builder()
                            .username("user")
                            .password(ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs.builder()
                                .plaintext("password")
                                .build())
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:alloydb:Cluster
        properties:
          clusterId: alloydb-cluster-${nameSuffix}
          location: us-central1
          networkConfig:
            network: ${defaultNetwork.id}
          initialUser:
            password: alloydb-cluster-password
          deletionProtection: false
      defaultInstance:
        type: gcp:alloydb:Instance
        name: default
        properties:
          cluster: ${default.name}
          instanceId: alloydb-instance-${nameSuffix}
          instanceType: PRIMARY
          machineConfig:
            cpuCount: 2
        options:
          dependsOn:
            - ${vpcConnection}
      defaultNetwork:
        type: gcp:compute:Network
        name: default
        properties:
          name: alloydb-network-${nameSuffix}
      privateIpAlloc:
        type: gcp:compute:GlobalAddress
        name: private_ip_alloc
        properties:
          name: alloydb-ip-${nameSuffix}
          addressType: INTERNAL
          purpose: VPC_PEERING
          prefixLength: 16
          network: ${defaultNetwork.id}
      vpcConnection:
        type: gcp:servicenetworking:Connection
        name: vpc_connection
        properties:
          network: ${defaultNetwork.id}
          service: servicenetworking.googleapis.com
          reservedPeeringRanges:
            - ${privateIpAlloc.name}
      connection:
        type: gcp:bigquery:Connection
        properties:
          connectionId: my-connection
          location: us-central1
          friendlyName: alloydb connection
          description: AlloyDB connection using connector configuration
          configuration:
            connectorId: google-alloydb
            asset:
              database: postgres
              googleCloudResource: //alloydb.googleapis.com/${defaultInstance.id}
            authentication:
              usernamePassword:
                username: user
                password:
                  plaintext: password
    variables:
      nameSuffix: my-connection
    

    Create Connection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Connection(name: string, args?: ConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def Connection(resource_name: str,
                   args: Optional[ConnectionArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Connection(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   aws: Optional[ConnectionAwsArgs] = None,
                   azure: Optional[ConnectionAzureArgs] = None,
                   cloud_resource: Optional[ConnectionCloudResourceArgs] = None,
                   cloud_spanner: Optional[ConnectionCloudSpannerArgs] = None,
                   cloud_sql: Optional[ConnectionCloudSqlArgs] = None,
                   configuration: Optional[ConnectionConfigurationArgs] = None,
                   connection_id: Optional[str] = None,
                   description: Optional[str] = None,
                   friendly_name: Optional[str] = None,
                   kms_key_name: Optional[str] = None,
                   location: Optional[str] = None,
                   project: Optional[str] = None,
                   spark: Optional[ConnectionSparkArgs] = None)
    func NewConnection(ctx *Context, name string, args *ConnectionArgs, opts ...ResourceOption) (*Connection, error)
    public Connection(string name, ConnectionArgs? args = null, CustomResourceOptions? opts = null)
    public Connection(String name, ConnectionArgs args)
    public Connection(String name, ConnectionArgs args, CustomResourceOptions options)
    
    type: gcp:bigquery:Connection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var connectionResource = new Gcp.BigQuery.Connection("connectionResource", new()
    {
        Aws = new Gcp.BigQuery.Inputs.ConnectionAwsArgs
        {
            AccessRole = new Gcp.BigQuery.Inputs.ConnectionAwsAccessRoleArgs
            {
                IamRoleId = "string",
                Identity = "string",
            },
        },
        Azure = new Gcp.BigQuery.Inputs.ConnectionAzureArgs
        {
            CustomerTenantId = "string",
            Application = "string",
            ClientId = "string",
            FederatedApplicationClientId = "string",
            Identity = "string",
            ObjectId = "string",
            RedirectUri = "string",
        },
        CloudResource = new Gcp.BigQuery.Inputs.ConnectionCloudResourceArgs
        {
            ServiceAccountId = "string",
        },
        CloudSpanner = new Gcp.BigQuery.Inputs.ConnectionCloudSpannerArgs
        {
            Database = "string",
            DatabaseRole = "string",
            MaxParallelism = 0,
            UseDataBoost = false,
            UseParallelism = false,
        },
        CloudSql = new Gcp.BigQuery.Inputs.ConnectionCloudSqlArgs
        {
            Credential = new Gcp.BigQuery.Inputs.ConnectionCloudSqlCredentialArgs
            {
                Password = "string",
                Username = "string",
            },
            Database = "string",
            InstanceId = "string",
            Type = "string",
            ServiceAccountId = "string",
        },
        Configuration = new Gcp.BigQuery.Inputs.ConnectionConfigurationArgs
        {
            Asset = new Gcp.BigQuery.Inputs.ConnectionConfigurationAssetArgs
            {
                Database = "string",
                GoogleCloudResource = "string",
            },
            ConnectorId = "string",
            Authentication = new Gcp.BigQuery.Inputs.ConnectionConfigurationAuthenticationArgs
            {
                ServiceAccount = "string",
                UsernamePassword = new Gcp.BigQuery.Inputs.ConnectionConfigurationAuthenticationUsernamePasswordArgs
                {
                    Password = new Gcp.BigQuery.Inputs.ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs
                    {
                        Plaintext = "string",
                        SecretType = "string",
                    },
                    Username = "string",
                },
            },
            Endpoint = new Gcp.BigQuery.Inputs.ConnectionConfigurationEndpointArgs
            {
                HostPort = "string",
            },
            Network = new Gcp.BigQuery.Inputs.ConnectionConfigurationNetworkArgs
            {
                PrivateServiceConnect = new Gcp.BigQuery.Inputs.ConnectionConfigurationNetworkPrivateServiceConnectArgs
                {
                    NetworkAttachment = "string",
                },
            },
        },
        ConnectionId = "string",
        Description = "string",
        FriendlyName = "string",
        KmsKeyName = "string",
        Location = "string",
        Project = "string",
        Spark = new Gcp.BigQuery.Inputs.ConnectionSparkArgs
        {
            MetastoreServiceConfig = new Gcp.BigQuery.Inputs.ConnectionSparkMetastoreServiceConfigArgs
            {
                MetastoreService = "string",
            },
            ServiceAccountId = "string",
            SparkHistoryServerConfig = new Gcp.BigQuery.Inputs.ConnectionSparkSparkHistoryServerConfigArgs
            {
                DataprocCluster = "string",
            },
        },
    });
    
    example, err := bigquery.NewConnection(ctx, "connectionResource", &bigquery.ConnectionArgs{
    	Aws: &bigquery.ConnectionAwsArgs{
    		AccessRole: &bigquery.ConnectionAwsAccessRoleArgs{
    			IamRoleId: pulumi.String("string"),
    			Identity:  pulumi.String("string"),
    		},
    	},
    	Azure: &bigquery.ConnectionAzureArgs{
    		CustomerTenantId:             pulumi.String("string"),
    		Application:                  pulumi.String("string"),
    		ClientId:                     pulumi.String("string"),
    		FederatedApplicationClientId: pulumi.String("string"),
    		Identity:                     pulumi.String("string"),
    		ObjectId:                     pulumi.String("string"),
    		RedirectUri:                  pulumi.String("string"),
    	},
    	CloudResource: &bigquery.ConnectionCloudResourceArgs{
    		ServiceAccountId: pulumi.String("string"),
    	},
    	CloudSpanner: &bigquery.ConnectionCloudSpannerArgs{
    		Database:       pulumi.String("string"),
    		DatabaseRole:   pulumi.String("string"),
    		MaxParallelism: pulumi.Int(0),
    		UseDataBoost:   pulumi.Bool(false),
    		UseParallelism: pulumi.Bool(false),
    	},
    	CloudSql: &bigquery.ConnectionCloudSqlArgs{
    		Credential: &bigquery.ConnectionCloudSqlCredentialArgs{
    			Password: pulumi.String("string"),
    			Username: pulumi.String("string"),
    		},
    		Database:         pulumi.String("string"),
    		InstanceId:       pulumi.String("string"),
    		Type:             pulumi.String("string"),
    		ServiceAccountId: pulumi.String("string"),
    	},
    	Configuration: &bigquery.ConnectionConfigurationArgs{
    		Asset: &bigquery.ConnectionConfigurationAssetArgs{
    			Database:            pulumi.String("string"),
    			GoogleCloudResource: pulumi.String("string"),
    		},
    		ConnectorId: pulumi.String("string"),
    		Authentication: &bigquery.ConnectionConfigurationAuthenticationArgs{
    			ServiceAccount: pulumi.String("string"),
    			UsernamePassword: &bigquery.ConnectionConfigurationAuthenticationUsernamePasswordArgs{
    				Password: &bigquery.ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs{
    					Plaintext:  pulumi.String("string"),
    					SecretType: pulumi.String("string"),
    				},
    				Username: pulumi.String("string"),
    			},
    		},
    		Endpoint: &bigquery.ConnectionConfigurationEndpointArgs{
    			HostPort: pulumi.String("string"),
    		},
    		Network: &bigquery.ConnectionConfigurationNetworkArgs{
    			PrivateServiceConnect: &bigquery.ConnectionConfigurationNetworkPrivateServiceConnectArgs{
    				NetworkAttachment: pulumi.String("string"),
    			},
    		},
    	},
    	ConnectionId: pulumi.String("string"),
    	Description:  pulumi.String("string"),
    	FriendlyName: pulumi.String("string"),
    	KmsKeyName:   pulumi.String("string"),
    	Location:     pulumi.String("string"),
    	Project:      pulumi.String("string"),
    	Spark: &bigquery.ConnectionSparkArgs{
    		MetastoreServiceConfig: &bigquery.ConnectionSparkMetastoreServiceConfigArgs{
    			MetastoreService: pulumi.String("string"),
    		},
    		ServiceAccountId: pulumi.String("string"),
    		SparkHistoryServerConfig: &bigquery.ConnectionSparkSparkHistoryServerConfigArgs{
    			DataprocCluster: pulumi.String("string"),
    		},
    	},
    })
    
    var connectionResource = new com.pulumi.gcp.bigquery.Connection("connectionResource", com.pulumi.gcp.bigquery.ConnectionArgs.builder()
        .aws(ConnectionAwsArgs.builder()
            .accessRole(ConnectionAwsAccessRoleArgs.builder()
                .iamRoleId("string")
                .identity("string")
                .build())
            .build())
        .azure(ConnectionAzureArgs.builder()
            .customerTenantId("string")
            .application("string")
            .clientId("string")
            .federatedApplicationClientId("string")
            .identity("string")
            .objectId("string")
            .redirectUri("string")
            .build())
        .cloudResource(ConnectionCloudResourceArgs.builder()
            .serviceAccountId("string")
            .build())
        .cloudSpanner(ConnectionCloudSpannerArgs.builder()
            .database("string")
            .databaseRole("string")
            .maxParallelism(0)
            .useDataBoost(false)
            .useParallelism(false)
            .build())
        .cloudSql(ConnectionCloudSqlArgs.builder()
            .credential(ConnectionCloudSqlCredentialArgs.builder()
                .password("string")
                .username("string")
                .build())
            .database("string")
            .instanceId("string")
            .type("string")
            .serviceAccountId("string")
            .build())
        .configuration(ConnectionConfigurationArgs.builder()
            .asset(ConnectionConfigurationAssetArgs.builder()
                .database("string")
                .googleCloudResource("string")
                .build())
            .connectorId("string")
            .authentication(ConnectionConfigurationAuthenticationArgs.builder()
                .serviceAccount("string")
                .usernamePassword(ConnectionConfigurationAuthenticationUsernamePasswordArgs.builder()
                    .password(ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs.builder()
                        .plaintext("string")
                        .secretType("string")
                        .build())
                    .username("string")
                    .build())
                .build())
            .endpoint(ConnectionConfigurationEndpointArgs.builder()
                .hostPort("string")
                .build())
            .network(ConnectionConfigurationNetworkArgs.builder()
                .privateServiceConnect(ConnectionConfigurationNetworkPrivateServiceConnectArgs.builder()
                    .networkAttachment("string")
                    .build())
                .build())
            .build())
        .connectionId("string")
        .description("string")
        .friendlyName("string")
        .kmsKeyName("string")
        .location("string")
        .project("string")
        .spark(ConnectionSparkArgs.builder()
            .metastoreServiceConfig(ConnectionSparkMetastoreServiceConfigArgs.builder()
                .metastoreService("string")
                .build())
            .serviceAccountId("string")
            .sparkHistoryServerConfig(ConnectionSparkSparkHistoryServerConfigArgs.builder()
                .dataprocCluster("string")
                .build())
            .build())
        .build());
    
    connection_resource = gcp.bigquery.Connection("connectionResource",
        aws={
            "access_role": {
                "iam_role_id": "string",
                "identity": "string",
            },
        },
        azure={
            "customer_tenant_id": "string",
            "application": "string",
            "client_id": "string",
            "federated_application_client_id": "string",
            "identity": "string",
            "object_id": "string",
            "redirect_uri": "string",
        },
        cloud_resource={
            "service_account_id": "string",
        },
        cloud_spanner={
            "database": "string",
            "database_role": "string",
            "max_parallelism": 0,
            "use_data_boost": False,
            "use_parallelism": False,
        },
        cloud_sql={
            "credential": {
                "password": "string",
                "username": "string",
            },
            "database": "string",
            "instance_id": "string",
            "type": "string",
            "service_account_id": "string",
        },
        configuration={
            "asset": {
                "database": "string",
                "google_cloud_resource": "string",
            },
            "connector_id": "string",
            "authentication": {
                "service_account": "string",
                "username_password": {
                    "password": {
                        "plaintext": "string",
                        "secret_type": "string",
                    },
                    "username": "string",
                },
            },
            "endpoint": {
                "host_port": "string",
            },
            "network": {
                "private_service_connect": {
                    "network_attachment": "string",
                },
            },
        },
        connection_id="string",
        description="string",
        friendly_name="string",
        kms_key_name="string",
        location="string",
        project="string",
        spark={
            "metastore_service_config": {
                "metastore_service": "string",
            },
            "service_account_id": "string",
            "spark_history_server_config": {
                "dataproc_cluster": "string",
            },
        })
    
    const connectionResource = new gcp.bigquery.Connection("connectionResource", {
        aws: {
            accessRole: {
                iamRoleId: "string",
                identity: "string",
            },
        },
        azure: {
            customerTenantId: "string",
            application: "string",
            clientId: "string",
            federatedApplicationClientId: "string",
            identity: "string",
            objectId: "string",
            redirectUri: "string",
        },
        cloudResource: {
            serviceAccountId: "string",
        },
        cloudSpanner: {
            database: "string",
            databaseRole: "string",
            maxParallelism: 0,
            useDataBoost: false,
            useParallelism: false,
        },
        cloudSql: {
            credential: {
                password: "string",
                username: "string",
            },
            database: "string",
            instanceId: "string",
            type: "string",
            serviceAccountId: "string",
        },
        configuration: {
            asset: {
                database: "string",
                googleCloudResource: "string",
            },
            connectorId: "string",
            authentication: {
                serviceAccount: "string",
                usernamePassword: {
                    password: {
                        plaintext: "string",
                        secretType: "string",
                    },
                    username: "string",
                },
            },
            endpoint: {
                hostPort: "string",
            },
            network: {
                privateServiceConnect: {
                    networkAttachment: "string",
                },
            },
        },
        connectionId: "string",
        description: "string",
        friendlyName: "string",
        kmsKeyName: "string",
        location: "string",
        project: "string",
        spark: {
            metastoreServiceConfig: {
                metastoreService: "string",
            },
            serviceAccountId: "string",
            sparkHistoryServerConfig: {
                dataprocCluster: "string",
            },
        },
    });
    
    type: gcp:bigquery:Connection
    properties:
        aws:
            accessRole:
                iamRoleId: string
                identity: string
        azure:
            application: string
            clientId: string
            customerTenantId: string
            federatedApplicationClientId: string
            identity: string
            objectId: string
            redirectUri: string
        cloudResource:
            serviceAccountId: string
        cloudSpanner:
            database: string
            databaseRole: string
            maxParallelism: 0
            useDataBoost: false
            useParallelism: false
        cloudSql:
            credential:
                password: string
                username: string
            database: string
            instanceId: string
            serviceAccountId: string
            type: string
        configuration:
            asset:
                database: string
                googleCloudResource: string
            authentication:
                serviceAccount: string
                usernamePassword:
                    password:
                        plaintext: string
                        secretType: string
                    username: string
            connectorId: string
            endpoint:
                hostPort: string
            network:
                privateServiceConnect:
                    networkAttachment: string
        connectionId: string
        description: string
        friendlyName: string
        kmsKeyName: string
        location: string
        project: string
        spark:
            metastoreServiceConfig:
                metastoreService: string
            serviceAccountId: string
            sparkHistoryServerConfig:
                dataprocCluster: string
    

    Connection Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Connection resource accepts the following input properties:

    Aws ConnectionAws
    Connection properties specific to Amazon Web Services. Structure is documented below.
    Azure ConnectionAzure
    Container for connection properties specific to Azure. Structure is documented below.
    CloudResource ConnectionCloudResource
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    CloudSpanner ConnectionCloudSpanner
    Connection properties specific to Cloud Spanner Structure is documented below.
    CloudSql ConnectionCloudSql
    Connection properties specific to the Cloud SQL. Structure is documented below.
    Configuration ConnectionConfiguration
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    ConnectionId string
    Optional connection id that should be assigned to the created connection.
    Description string
    A descriptive description for the connection
    FriendlyName string
    A descriptive name for the connection
    KmsKeyName string
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    Location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Spark ConnectionSpark
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    Aws ConnectionAwsArgs
    Connection properties specific to Amazon Web Services. Structure is documented below.
    Azure ConnectionAzureArgs
    Container for connection properties specific to Azure. Structure is documented below.
    CloudResource ConnectionCloudResourceArgs
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    CloudSpanner ConnectionCloudSpannerArgs
    Connection properties specific to Cloud Spanner Structure is documented below.
    CloudSql ConnectionCloudSqlArgs
    Connection properties specific to the Cloud SQL. Structure is documented below.
    Configuration ConnectionConfigurationArgs
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    ConnectionId string
    Optional connection id that should be assigned to the created connection.
    Description string
    A descriptive description for the connection
    FriendlyName string
    A descriptive name for the connection
    KmsKeyName string
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    Location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Spark ConnectionSparkArgs
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws ConnectionAws
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure ConnectionAzure
    Container for connection properties specific to Azure. Structure is documented below.
    cloudResource ConnectionCloudResource
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloudSpanner ConnectionCloudSpanner
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloudSql ConnectionCloudSql
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration ConnectionConfiguration
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connectionId String
    Optional connection id that should be assigned to the created connection.
    description String
    A descriptive description for the connection
    friendlyName String
    A descriptive name for the connection
    kmsKeyName String
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location String
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark ConnectionSpark
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws ConnectionAws
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure ConnectionAzure
    Container for connection properties specific to Azure. Structure is documented below.
    cloudResource ConnectionCloudResource
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloudSpanner ConnectionCloudSpanner
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloudSql ConnectionCloudSql
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration ConnectionConfiguration
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connectionId string
    Optional connection id that should be assigned to the created connection.
    description string
    A descriptive description for the connection
    friendlyName string
    A descriptive name for the connection
    kmsKeyName string
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark ConnectionSpark
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws ConnectionAwsArgs
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure ConnectionAzureArgs
    Container for connection properties specific to Azure. Structure is documented below.
    cloud_resource ConnectionCloudResourceArgs
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloud_spanner ConnectionCloudSpannerArgs
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloud_sql ConnectionCloudSqlArgs
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration ConnectionConfigurationArgs
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connection_id str
    Optional connection id that should be assigned to the created connection.
    description str
    A descriptive description for the connection
    friendly_name str
    A descriptive name for the connection
    kms_key_name str
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location str
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark ConnectionSparkArgs
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws Property Map
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure Property Map
    Container for connection properties specific to Azure. Structure is documented below.
    cloudResource Property Map
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloudSpanner Property Map
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloudSql Property Map
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration Property Map
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connectionId String
    Optional connection id that should be assigned to the created connection.
    description String
    A descriptive description for the connection
    friendlyName String
    A descriptive name for the connection
    kmsKeyName String
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location String
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark Property Map
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Connection resource produces the following output properties:

    HasCredential bool
    True if the connection has credential assigned.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    HasCredential bool
    True if the connection has credential assigned.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    hasCredential Boolean
    True if the connection has credential assigned.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    hasCredential boolean
    True if the connection has credential assigned.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    has_credential bool
    True if the connection has credential assigned.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    hasCredential Boolean
    True if the connection has credential assigned.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"

    Look up Existing Connection Resource

    Get an existing Connection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ConnectionState, opts?: CustomResourceOptions): Connection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aws: Optional[ConnectionAwsArgs] = None,
            azure: Optional[ConnectionAzureArgs] = None,
            cloud_resource: Optional[ConnectionCloudResourceArgs] = None,
            cloud_spanner: Optional[ConnectionCloudSpannerArgs] = None,
            cloud_sql: Optional[ConnectionCloudSqlArgs] = None,
            configuration: Optional[ConnectionConfigurationArgs] = None,
            connection_id: Optional[str] = None,
            description: Optional[str] = None,
            friendly_name: Optional[str] = None,
            has_credential: Optional[bool] = None,
            kms_key_name: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            spark: Optional[ConnectionSparkArgs] = None) -> Connection
    func GetConnection(ctx *Context, name string, id IDInput, state *ConnectionState, opts ...ResourceOption) (*Connection, error)
    public static Connection Get(string name, Input<string> id, ConnectionState? state, CustomResourceOptions? opts = null)
    public static Connection get(String name, Output<String> id, ConnectionState state, CustomResourceOptions options)
    resources:  _:    type: gcp:bigquery:Connection    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Aws ConnectionAws
    Connection properties specific to Amazon Web Services. Structure is documented below.
    Azure ConnectionAzure
    Container for connection properties specific to Azure. Structure is documented below.
    CloudResource ConnectionCloudResource
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    CloudSpanner ConnectionCloudSpanner
    Connection properties specific to Cloud Spanner Structure is documented below.
    CloudSql ConnectionCloudSql
    Connection properties specific to the Cloud SQL. Structure is documented below.
    Configuration ConnectionConfiguration
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    ConnectionId string
    Optional connection id that should be assigned to the created connection.
    Description string
    A descriptive description for the connection
    FriendlyName string
    A descriptive name for the connection
    HasCredential bool
    True if the connection has credential assigned.
    KmsKeyName string
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    Location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    Name string
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Spark ConnectionSpark
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    Aws ConnectionAwsArgs
    Connection properties specific to Amazon Web Services. Structure is documented below.
    Azure ConnectionAzureArgs
    Container for connection properties specific to Azure. Structure is documented below.
    CloudResource ConnectionCloudResourceArgs
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    CloudSpanner ConnectionCloudSpannerArgs
    Connection properties specific to Cloud Spanner Structure is documented below.
    CloudSql ConnectionCloudSqlArgs
    Connection properties specific to the Cloud SQL. Structure is documented below.
    Configuration ConnectionConfigurationArgs
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    ConnectionId string
    Optional connection id that should be assigned to the created connection.
    Description string
    A descriptive description for the connection
    FriendlyName string
    A descriptive name for the connection
    HasCredential bool
    True if the connection has credential assigned.
    KmsKeyName string
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    Location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    Name string
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Spark ConnectionSparkArgs
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws ConnectionAws
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure ConnectionAzure
    Container for connection properties specific to Azure. Structure is documented below.
    cloudResource ConnectionCloudResource
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloudSpanner ConnectionCloudSpanner
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloudSql ConnectionCloudSql
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration ConnectionConfiguration
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connectionId String
    Optional connection id that should be assigned to the created connection.
    description String
    A descriptive description for the connection
    friendlyName String
    A descriptive name for the connection
    hasCredential Boolean
    True if the connection has credential assigned.
    kmsKeyName String
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location String
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    name String
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark ConnectionSpark
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws ConnectionAws
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure ConnectionAzure
    Container for connection properties specific to Azure. Structure is documented below.
    cloudResource ConnectionCloudResource
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloudSpanner ConnectionCloudSpanner
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloudSql ConnectionCloudSql
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration ConnectionConfiguration
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connectionId string
    Optional connection id that should be assigned to the created connection.
    description string
    A descriptive description for the connection
    friendlyName string
    A descriptive name for the connection
    hasCredential boolean
    True if the connection has credential assigned.
    kmsKeyName string
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location string
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    name string
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark ConnectionSpark
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws ConnectionAwsArgs
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure ConnectionAzureArgs
    Container for connection properties specific to Azure. Structure is documented below.
    cloud_resource ConnectionCloudResourceArgs
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloud_spanner ConnectionCloudSpannerArgs
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloud_sql ConnectionCloudSqlArgs
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration ConnectionConfigurationArgs
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connection_id str
    Optional connection id that should be assigned to the created connection.
    description str
    A descriptive description for the connection
    friendly_name str
    A descriptive name for the connection
    has_credential bool
    True if the connection has credential assigned.
    kms_key_name str
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location str
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    name str
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark ConnectionSparkArgs
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.
    aws Property Map
    Connection properties specific to Amazon Web Services. Structure is documented below.
    azure Property Map
    Container for connection properties specific to Azure. Structure is documented below.
    cloudResource Property Map
    Container for connection properties for delegation of access to GCP resources. Structure is documented below.
    cloudSpanner Property Map
    Connection properties specific to Cloud Spanner Structure is documented below.
    cloudSql Property Map
    Connection properties specific to the Cloud SQL. Structure is documented below.
    configuration Property Map
    Connector configuration. This is a generic configuration that is used to connect to external data sources such as AlloyDB, MySQL, and PostgreSQL using the BigQuery Connector framework. Structure is documented below.
    connectionId String
    Optional connection id that should be assigned to the created connection.
    description String
    A descriptive description for the connection
    friendlyName String
    A descriptive name for the connection
    hasCredential Boolean
    True if the connection has credential assigned.
    kmsKeyName String
    Optional. The Cloud KMS key that is used for encryption. Example: projects/[kmsProjectId]/locations/[region]/keyRings/[keyRegion]/cryptoKeys/[key]
    location String
    The geographic location where the connection should reside. Cloud SQL instance must be in the same location as the connection with following exceptions: Cloud SQL us-central1 maps to BigQuery US, Cloud SQL europe-west1 maps to BigQuery EU. Examples: US, EU, asia-northeast1, us-central1, europe-west1. Spanner Connections same as spanner region AWS allowed regions are aws-us-east-1 Azure allowed regions are azure-eastus2
    name String
    The resource name of the connection in the form of: "projects/{project_id}/locations/{location_id}/connections/{connectionId}"
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    spark Property Map
    Container for connection properties to execute stored procedures for Apache Spark. resources. Structure is documented below.

    Supporting Types

    ConnectionAws, ConnectionAwsArgs

    AccessRole ConnectionAwsAccessRole
    Authentication using Google owned service account to assume into customer's AWS IAM Role. Structure is documented below.
    AccessRole ConnectionAwsAccessRole
    Authentication using Google owned service account to assume into customer's AWS IAM Role. Structure is documented below.
    accessRole ConnectionAwsAccessRole
    Authentication using Google owned service account to assume into customer's AWS IAM Role. Structure is documented below.
    accessRole ConnectionAwsAccessRole
    Authentication using Google owned service account to assume into customer's AWS IAM Role. Structure is documented below.
    access_role ConnectionAwsAccessRole
    Authentication using Google owned service account to assume into customer's AWS IAM Role. Structure is documented below.
    accessRole Property Map
    Authentication using Google owned service account to assume into customer's AWS IAM Role. Structure is documented below.

    ConnectionAwsAccessRole, ConnectionAwsAccessRoleArgs

    IamRoleId string
    The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection.
    Identity string
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role.
    IamRoleId string
    The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection.
    Identity string
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role.
    iamRoleId String
    The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection.
    identity String
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role.
    iamRoleId string
    The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection.
    identity string
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role.
    iam_role_id str
    The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection.
    identity str
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role.
    iamRoleId String
    The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection.
    identity String
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role.

    ConnectionAzure, ConnectionAzureArgs

    CustomerTenantId string
    The id of customer's directory that host the data.
    Application string
    (Output) The name of the Azure Active Directory Application.
    ClientId string
    (Output) The client id of the Azure Active Directory Application.
    FederatedApplicationClientId string
    The Azure Application (client) ID where the federated credentials will be hosted.
    Identity string
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.
    ObjectId string
    (Output) The object id of the Azure Active Directory Application.
    RedirectUri string
    (Output) The URL user will be redirected to after granting consent during connection setup.
    CustomerTenantId string
    The id of customer's directory that host the data.
    Application string
    (Output) The name of the Azure Active Directory Application.
    ClientId string
    (Output) The client id of the Azure Active Directory Application.
    FederatedApplicationClientId string
    The Azure Application (client) ID where the federated credentials will be hosted.
    Identity string
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.
    ObjectId string
    (Output) The object id of the Azure Active Directory Application.
    RedirectUri string
    (Output) The URL user will be redirected to after granting consent during connection setup.
    customerTenantId String
    The id of customer's directory that host the data.
    application String
    (Output) The name of the Azure Active Directory Application.
    clientId String
    (Output) The client id of the Azure Active Directory Application.
    federatedApplicationClientId String
    The Azure Application (client) ID where the federated credentials will be hosted.
    identity String
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.
    objectId String
    (Output) The object id of the Azure Active Directory Application.
    redirectUri String
    (Output) The URL user will be redirected to after granting consent during connection setup.
    customerTenantId string
    The id of customer's directory that host the data.
    application string
    (Output) The name of the Azure Active Directory Application.
    clientId string
    (Output) The client id of the Azure Active Directory Application.
    federatedApplicationClientId string
    The Azure Application (client) ID where the federated credentials will be hosted.
    identity string
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.
    objectId string
    (Output) The object id of the Azure Active Directory Application.
    redirectUri string
    (Output) The URL user will be redirected to after granting consent during connection setup.
    customer_tenant_id str
    The id of customer's directory that host the data.
    application str
    (Output) The name of the Azure Active Directory Application.
    client_id str
    (Output) The client id of the Azure Active Directory Application.
    federated_application_client_id str
    The Azure Application (client) ID where the federated credentials will be hosted.
    identity str
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.
    object_id str
    (Output) The object id of the Azure Active Directory Application.
    redirect_uri str
    (Output) The URL user will be redirected to after granting consent during connection setup.
    customerTenantId String
    The id of customer's directory that host the data.
    application String
    (Output) The name of the Azure Active Directory Application.
    clientId String
    (Output) The client id of the Azure Active Directory Application.
    federatedApplicationClientId String
    The Azure Application (client) ID where the federated credentials will be hosted.
    identity String
    (Output) A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application.
    objectId String
    (Output) The object id of the Azure Active Directory Application.
    redirectUri String
    (Output) The URL user will be redirected to after granting consent during connection setup.

    ConnectionCloudResource, ConnectionCloudResourceArgs

    ServiceAccountId string
    (Output) The account ID of the service created for the purpose of this connection.
    ServiceAccountId string
    (Output) The account ID of the service created for the purpose of this connection.
    serviceAccountId String
    (Output) The account ID of the service created for the purpose of this connection.
    serviceAccountId string
    (Output) The account ID of the service created for the purpose of this connection.
    service_account_id str
    (Output) The account ID of the service created for the purpose of this connection.
    serviceAccountId String
    (Output) The account ID of the service created for the purpose of this connection.

    ConnectionCloudSpanner, ConnectionCloudSpannerArgs

    Database string
    Cloud Spanner database in the form `project/instance/database'.
    DatabaseRole string
    Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. The database role name must start with a letter, and can only contain letters, numbers, and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about.
    MaxParallelism int
    Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. useParallelism and useDataBoost must be set when setting max parallelism.
    UseDataBoost bool
    If set, the request will be executed via Spanner independent compute resources. useParallelism must be set when using data boost.
    UseParallelism bool
    If parallelism should be used when reading from Cloud Spanner.
    UseServerlessAnalytics bool

    (Optional, Deprecated) If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics.

    Warning: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    Deprecated: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    Database string
    Cloud Spanner database in the form `project/instance/database'.
    DatabaseRole string
    Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. The database role name must start with a letter, and can only contain letters, numbers, and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about.
    MaxParallelism int
    Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. useParallelism and useDataBoost must be set when setting max parallelism.
    UseDataBoost bool
    If set, the request will be executed via Spanner independent compute resources. useParallelism must be set when using data boost.
    UseParallelism bool
    If parallelism should be used when reading from Cloud Spanner.
    UseServerlessAnalytics bool

    (Optional, Deprecated) If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics.

    Warning: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    Deprecated: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    database String
    Cloud Spanner database in the form `project/instance/database'.
    databaseRole String
    Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. The database role name must start with a letter, and can only contain letters, numbers, and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about.
    maxParallelism Integer
    Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. useParallelism and useDataBoost must be set when setting max parallelism.
    useDataBoost Boolean
    If set, the request will be executed via Spanner independent compute resources. useParallelism must be set when using data boost.
    useParallelism Boolean
    If parallelism should be used when reading from Cloud Spanner.
    useServerlessAnalytics Boolean

    (Optional, Deprecated) If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics.

    Warning: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    Deprecated: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    database string
    Cloud Spanner database in the form `project/instance/database'.
    databaseRole string
    Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. The database role name must start with a letter, and can only contain letters, numbers, and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about.
    maxParallelism number
    Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. useParallelism and useDataBoost must be set when setting max parallelism.
    useDataBoost boolean
    If set, the request will be executed via Spanner independent compute resources. useParallelism must be set when using data boost.
    useParallelism boolean
    If parallelism should be used when reading from Cloud Spanner.
    useServerlessAnalytics boolean

    (Optional, Deprecated) If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics.

    Warning: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    Deprecated: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    database str
    Cloud Spanner database in the form `project/instance/database'.
    database_role str
    Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. The database role name must start with a letter, and can only contain letters, numbers, and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about.
    max_parallelism int
    Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. useParallelism and useDataBoost must be set when setting max parallelism.
    use_data_boost bool
    If set, the request will be executed via Spanner independent compute resources. useParallelism must be set when using data boost.
    use_parallelism bool
    If parallelism should be used when reading from Cloud Spanner.
    use_serverless_analytics bool

    (Optional, Deprecated) If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics.

    Warning: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    Deprecated: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    database String
    Cloud Spanner database in the form `project/instance/database'.
    databaseRole String
    Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. The database role name must start with a letter, and can only contain letters, numbers, and underscores. For more details, see https://cloud.google.com/spanner/docs/fgac-about.
    maxParallelism Number
    Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. useParallelism and useDataBoost must be set when setting max parallelism.
    useDataBoost Boolean
    If set, the request will be executed via Spanner independent compute resources. useParallelism must be set when using data boost.
    useParallelism Boolean
    If parallelism should be used when reading from Cloud Spanner.
    useServerlessAnalytics Boolean

    (Optional, Deprecated) If the serverless analytics service should be used to read data from Cloud Spanner. useParallelism must be set when using serverless analytics.

    Warning: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    Deprecated: useServerlessAnalytics is deprecated and will be removed in a future major release. Use useDataBoost instead.

    ConnectionCloudSql, ConnectionCloudSqlArgs

    Credential ConnectionCloudSqlCredential
    Cloud SQL properties. Structure is documented below.
    Database string
    Database name.
    InstanceId string
    Cloud SQL instance ID in the form project:location:instance.
    Type string
    Type of the Cloud SQL database. Possible values are: DATABASE_TYPE_UNSPECIFIED, POSTGRES, MYSQL.
    ServiceAccountId string
    (Output) When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
    Credential ConnectionCloudSqlCredential
    Cloud SQL properties. Structure is documented below.
    Database string
    Database name.
    InstanceId string
    Cloud SQL instance ID in the form project:location:instance.
    Type string
    Type of the Cloud SQL database. Possible values are: DATABASE_TYPE_UNSPECIFIED, POSTGRES, MYSQL.
    ServiceAccountId string
    (Output) When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
    credential ConnectionCloudSqlCredential
    Cloud SQL properties. Structure is documented below.
    database String
    Database name.
    instanceId String
    Cloud SQL instance ID in the form project:location:instance.
    type String
    Type of the Cloud SQL database. Possible values are: DATABASE_TYPE_UNSPECIFIED, POSTGRES, MYSQL.
    serviceAccountId String
    (Output) When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
    credential ConnectionCloudSqlCredential
    Cloud SQL properties. Structure is documented below.
    database string
    Database name.
    instanceId string
    Cloud SQL instance ID in the form project:location:instance.
    type string
    Type of the Cloud SQL database. Possible values are: DATABASE_TYPE_UNSPECIFIED, POSTGRES, MYSQL.
    serviceAccountId string
    (Output) When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
    credential ConnectionCloudSqlCredential
    Cloud SQL properties. Structure is documented below.
    database str
    Database name.
    instance_id str
    Cloud SQL instance ID in the form project:location:instance.
    type str
    Type of the Cloud SQL database. Possible values are: DATABASE_TYPE_UNSPECIFIED, POSTGRES, MYSQL.
    service_account_id str
    (Output) When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.
    credential Property Map
    Cloud SQL properties. Structure is documented below.
    database String
    Database name.
    instanceId String
    Cloud SQL instance ID in the form project:location:instance.
    type String
    Type of the Cloud SQL database. Possible values are: DATABASE_TYPE_UNSPECIFIED, POSTGRES, MYSQL.
    serviceAccountId String
    (Output) When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection.

    ConnectionCloudSqlCredential, ConnectionCloudSqlCredentialArgs

    Password string
    Password for database. Note: This property is sensitive and will not be displayed in the plan.
    Username string
    Username for database.
    Password string
    Password for database. Note: This property is sensitive and will not be displayed in the plan.
    Username string
    Username for database.
    password String
    Password for database. Note: This property is sensitive and will not be displayed in the plan.
    username String
    Username for database.
    password string
    Password for database. Note: This property is sensitive and will not be displayed in the plan.
    username string
    Username for database.
    password str
    Password for database. Note: This property is sensitive and will not be displayed in the plan.
    username str
    Username for database.
    password String
    Password for database. Note: This property is sensitive and will not be displayed in the plan.
    username String
    Username for database.

    ConnectionConfiguration, ConnectionConfigurationArgs

    Asset ConnectionConfigurationAsset
    Asset configuration for the connector. Structure is documented below.
    ConnectorId string
    The ID of the connector. Possible values include google-alloydb, google-cloudsql-mysql, google-cloudsql-postgres, and other connector IDs supported by the BigQuery Connector framework.
    Authentication ConnectionConfigurationAuthentication
    Authentication configuration for the connector. Structure is documented below.
    Endpoint ConnectionConfigurationEndpoint
    Endpoint configuration for the connector. Structure is documented below.
    Network ConnectionConfigurationNetwork
    Network configuration for the connector. Structure is documented below.
    Asset ConnectionConfigurationAsset
    Asset configuration for the connector. Structure is documented below.
    ConnectorId string
    The ID of the connector. Possible values include google-alloydb, google-cloudsql-mysql, google-cloudsql-postgres, and other connector IDs supported by the BigQuery Connector framework.
    Authentication ConnectionConfigurationAuthentication
    Authentication configuration for the connector. Structure is documented below.
    Endpoint ConnectionConfigurationEndpoint
    Endpoint configuration for the connector. Structure is documented below.
    Network ConnectionConfigurationNetwork
    Network configuration for the connector. Structure is documented below.
    asset ConnectionConfigurationAsset
    Asset configuration for the connector. Structure is documented below.
    connectorId String
    The ID of the connector. Possible values include google-alloydb, google-cloudsql-mysql, google-cloudsql-postgres, and other connector IDs supported by the BigQuery Connector framework.
    authentication ConnectionConfigurationAuthentication
    Authentication configuration for the connector. Structure is documented below.
    endpoint ConnectionConfigurationEndpoint
    Endpoint configuration for the connector. Structure is documented below.
    network ConnectionConfigurationNetwork
    Network configuration for the connector. Structure is documented below.
    asset ConnectionConfigurationAsset
    Asset configuration for the connector. Structure is documented below.
    connectorId string
    The ID of the connector. Possible values include google-alloydb, google-cloudsql-mysql, google-cloudsql-postgres, and other connector IDs supported by the BigQuery Connector framework.
    authentication ConnectionConfigurationAuthentication
    Authentication configuration for the connector. Structure is documented below.
    endpoint ConnectionConfigurationEndpoint
    Endpoint configuration for the connector. Structure is documented below.
    network ConnectionConfigurationNetwork
    Network configuration for the connector. Structure is documented below.
    asset ConnectionConfigurationAsset
    Asset configuration for the connector. Structure is documented below.
    connector_id str
    The ID of the connector. Possible values include google-alloydb, google-cloudsql-mysql, google-cloudsql-postgres, and other connector IDs supported by the BigQuery Connector framework.
    authentication ConnectionConfigurationAuthentication
    Authentication configuration for the connector. Structure is documented below.
    endpoint ConnectionConfigurationEndpoint
    Endpoint configuration for the connector. Structure is documented below.
    network ConnectionConfigurationNetwork
    Network configuration for the connector. Structure is documented below.
    asset Property Map
    Asset configuration for the connector. Structure is documented below.
    connectorId String
    The ID of the connector. Possible values include google-alloydb, google-cloudsql-mysql, google-cloudsql-postgres, and other connector IDs supported by the BigQuery Connector framework.
    authentication Property Map
    Authentication configuration for the connector. Structure is documented below.
    endpoint Property Map
    Endpoint configuration for the connector. Structure is documented below.
    network Property Map
    Network configuration for the connector. Structure is documented below.

    ConnectionConfigurationAsset, ConnectionConfigurationAssetArgs

    Database string
    The name of the database.
    GoogleCloudResource string
    The full resource name of the Google Cloud resource. For AlloyDB, this is in the format of //alloydb.googleapis.com/projects/{project}/locations/{region}/clusters/{cluster}/instances/{instance}.
    Database string
    The name of the database.
    GoogleCloudResource string
    The full resource name of the Google Cloud resource. For AlloyDB, this is in the format of //alloydb.googleapis.com/projects/{project}/locations/{region}/clusters/{cluster}/instances/{instance}.
    database String
    The name of the database.
    googleCloudResource String
    The full resource name of the Google Cloud resource. For AlloyDB, this is in the format of //alloydb.googleapis.com/projects/{project}/locations/{region}/clusters/{cluster}/instances/{instance}.
    database string
    The name of the database.
    googleCloudResource string
    The full resource name of the Google Cloud resource. For AlloyDB, this is in the format of //alloydb.googleapis.com/projects/{project}/locations/{region}/clusters/{cluster}/instances/{instance}.
    database str
    The name of the database.
    google_cloud_resource str
    The full resource name of the Google Cloud resource. For AlloyDB, this is in the format of //alloydb.googleapis.com/projects/{project}/locations/{region}/clusters/{cluster}/instances/{instance}.
    database String
    The name of the database.
    googleCloudResource String
    The full resource name of the Google Cloud resource. For AlloyDB, this is in the format of //alloydb.googleapis.com/projects/{project}/locations/{region}/clusters/{cluster}/instances/{instance}.

    ConnectionConfigurationAuthentication, ConnectionConfigurationAuthenticationArgs

    ServiceAccount string
    (Output) Output only. The service account used for authenticating with the connector.
    UsernamePassword ConnectionConfigurationAuthenticationUsernamePassword
    Username/password authentication configuration. Structure is documented below.
    ServiceAccount string
    (Output) Output only. The service account used for authenticating with the connector.
    UsernamePassword ConnectionConfigurationAuthenticationUsernamePassword
    Username/password authentication configuration. Structure is documented below.
    serviceAccount String
    (Output) Output only. The service account used for authenticating with the connector.
    usernamePassword ConnectionConfigurationAuthenticationUsernamePassword
    Username/password authentication configuration. Structure is documented below.
    serviceAccount string
    (Output) Output only. The service account used for authenticating with the connector.
    usernamePassword ConnectionConfigurationAuthenticationUsernamePassword
    Username/password authentication configuration. Structure is documented below.
    service_account str
    (Output) Output only. The service account used for authenticating with the connector.
    username_password ConnectionConfigurationAuthenticationUsernamePassword
    Username/password authentication configuration. Structure is documented below.
    serviceAccount String
    (Output) Output only. The service account used for authenticating with the connector.
    usernamePassword Property Map
    Username/password authentication configuration. Structure is documented below.

    ConnectionConfigurationAuthenticationUsernamePassword, ConnectionConfigurationAuthenticationUsernamePasswordArgs

    Password ConnectionConfigurationAuthenticationUsernamePasswordPassword
    Password configuration for the connector. Structure is documented below.
    Username string
    Username for the connector.
    Password ConnectionConfigurationAuthenticationUsernamePasswordPassword
    Password configuration for the connector. Structure is documented below.
    Username string
    Username for the connector.
    password ConnectionConfigurationAuthenticationUsernamePasswordPassword
    Password configuration for the connector. Structure is documented below.
    username String
    Username for the connector.
    password ConnectionConfigurationAuthenticationUsernamePasswordPassword
    Password configuration for the connector. Structure is documented below.
    username string
    Username for the connector.
    password ConnectionConfigurationAuthenticationUsernamePasswordPassword
    Password configuration for the connector. Structure is documented below.
    username str
    Username for the connector.
    password Property Map
    Password configuration for the connector. Structure is documented below.
    username String
    Username for the connector.

    ConnectionConfigurationAuthenticationUsernamePasswordPassword, ConnectionConfigurationAuthenticationUsernamePasswordPasswordArgs

    Plaintext string
    The plaintext password. Note: This property is sensitive and will not be displayed in the plan.
    SecretType string
    (Output) Output only. The type of the secret.
    Plaintext string
    The plaintext password. Note: This property is sensitive and will not be displayed in the plan.
    SecretType string
    (Output) Output only. The type of the secret.
    plaintext String
    The plaintext password. Note: This property is sensitive and will not be displayed in the plan.
    secretType String
    (Output) Output only. The type of the secret.
    plaintext string
    The plaintext password. Note: This property is sensitive and will not be displayed in the plan.
    secretType string
    (Output) Output only. The type of the secret.
    plaintext str
    The plaintext password. Note: This property is sensitive and will not be displayed in the plan.
    secret_type str
    (Output) Output only. The type of the secret.
    plaintext String
    The plaintext password. Note: This property is sensitive and will not be displayed in the plan.
    secretType String
    (Output) Output only. The type of the secret.

    ConnectionConfigurationEndpoint, ConnectionConfigurationEndpointArgs

    HostPort string
    Host and port in the format of host:port for the connector endpoint.
    HostPort string
    Host and port in the format of host:port for the connector endpoint.
    hostPort String
    Host and port in the format of host:port for the connector endpoint.
    hostPort string
    Host and port in the format of host:port for the connector endpoint.
    host_port str
    Host and port in the format of host:port for the connector endpoint.
    hostPort String
    Host and port in the format of host:port for the connector endpoint.

    ConnectionConfigurationNetwork, ConnectionConfigurationNetworkArgs

    PrivateServiceConnect ConnectionConfigurationNetworkPrivateServiceConnect
    Private Service Connect configuration for the connector. Structure is documented below.
    PrivateServiceConnect ConnectionConfigurationNetworkPrivateServiceConnect
    Private Service Connect configuration for the connector. Structure is documented below.
    privateServiceConnect ConnectionConfigurationNetworkPrivateServiceConnect
    Private Service Connect configuration for the connector. Structure is documented below.
    privateServiceConnect ConnectionConfigurationNetworkPrivateServiceConnect
    Private Service Connect configuration for the connector. Structure is documented below.
    private_service_connect ConnectionConfigurationNetworkPrivateServiceConnect
    Private Service Connect configuration for the connector. Structure is documented below.
    privateServiceConnect Property Map
    Private Service Connect configuration for the connector. Structure is documented below.

    ConnectionConfigurationNetworkPrivateServiceConnect, ConnectionConfigurationNetworkPrivateServiceConnectArgs

    NetworkAttachment string
    The resource name of a network attachment in the format of projects/{project}/regions/{region}/networkAttachments/{networkAttachment}.
    NetworkAttachment string
    The resource name of a network attachment in the format of projects/{project}/regions/{region}/networkAttachments/{networkAttachment}.
    networkAttachment String
    The resource name of a network attachment in the format of projects/{project}/regions/{region}/networkAttachments/{networkAttachment}.
    networkAttachment string
    The resource name of a network attachment in the format of projects/{project}/regions/{region}/networkAttachments/{networkAttachment}.
    network_attachment str
    The resource name of a network attachment in the format of projects/{project}/regions/{region}/networkAttachments/{networkAttachment}.
    networkAttachment String
    The resource name of a network attachment in the format of projects/{project}/regions/{region}/networkAttachments/{networkAttachment}.

    ConnectionSpark, ConnectionSparkArgs

    MetastoreServiceConfig ConnectionSparkMetastoreServiceConfig
    Dataproc Metastore Service configuration for the connection. Structure is documented below.
    ServiceAccountId string
    (Output) The account ID of the service created for the purpose of this connection.
    SparkHistoryServerConfig ConnectionSparkSparkHistoryServerConfig
    Spark History Server configuration for the connection. Structure is documented below.
    MetastoreServiceConfig ConnectionSparkMetastoreServiceConfig
    Dataproc Metastore Service configuration for the connection. Structure is documented below.
    ServiceAccountId string
    (Output) The account ID of the service created for the purpose of this connection.
    SparkHistoryServerConfig ConnectionSparkSparkHistoryServerConfig
    Spark History Server configuration for the connection. Structure is documented below.
    metastoreServiceConfig ConnectionSparkMetastoreServiceConfig
    Dataproc Metastore Service configuration for the connection. Structure is documented below.
    serviceAccountId String
    (Output) The account ID of the service created for the purpose of this connection.
    sparkHistoryServerConfig ConnectionSparkSparkHistoryServerConfig
    Spark History Server configuration for the connection. Structure is documented below.
    metastoreServiceConfig ConnectionSparkMetastoreServiceConfig
    Dataproc Metastore Service configuration for the connection. Structure is documented below.
    serviceAccountId string
    (Output) The account ID of the service created for the purpose of this connection.
    sparkHistoryServerConfig ConnectionSparkSparkHistoryServerConfig
    Spark History Server configuration for the connection. Structure is documented below.
    metastore_service_config ConnectionSparkMetastoreServiceConfig
    Dataproc Metastore Service configuration for the connection. Structure is documented below.
    service_account_id str
    (Output) The account ID of the service created for the purpose of this connection.
    spark_history_server_config ConnectionSparkSparkHistoryServerConfig
    Spark History Server configuration for the connection. Structure is documented below.
    metastoreServiceConfig Property Map
    Dataproc Metastore Service configuration for the connection. Structure is documented below.
    serviceAccountId String
    (Output) The account ID of the service created for the purpose of this connection.
    sparkHistoryServerConfig Property Map
    Spark History Server configuration for the connection. Structure is documented below.

    ConnectionSparkMetastoreServiceConfig, ConnectionSparkMetastoreServiceConfigArgs

    MetastoreService string
    Resource name of an existing Dataproc Metastore service in the form of projects/[projectId]/locations/[region]/services/[serviceId].
    MetastoreService string
    Resource name of an existing Dataproc Metastore service in the form of projects/[projectId]/locations/[region]/services/[serviceId].
    metastoreService String
    Resource name of an existing Dataproc Metastore service in the form of projects/[projectId]/locations/[region]/services/[serviceId].
    metastoreService string
    Resource name of an existing Dataproc Metastore service in the form of projects/[projectId]/locations/[region]/services/[serviceId].
    metastore_service str
    Resource name of an existing Dataproc Metastore service in the form of projects/[projectId]/locations/[region]/services/[serviceId].
    metastoreService String
    Resource name of an existing Dataproc Metastore service in the form of projects/[projectId]/locations/[region]/services/[serviceId].

    ConnectionSparkSparkHistoryServerConfig, ConnectionSparkSparkHistoryServerConfigArgs

    DataprocCluster string
    Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection if the form of projects/[projectId]/regions/[region]/clusters/[clusterName].
    DataprocCluster string
    Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection if the form of projects/[projectId]/regions/[region]/clusters/[clusterName].
    dataprocCluster String
    Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection if the form of projects/[projectId]/regions/[region]/clusters/[clusterName].
    dataprocCluster string
    Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection if the form of projects/[projectId]/regions/[region]/clusters/[clusterName].
    dataproc_cluster str
    Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection if the form of projects/[projectId]/regions/[region]/clusters/[clusterName].
    dataprocCluster String
    Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection if the form of projects/[projectId]/regions/[region]/clusters/[clusterName].

    Import

    Connection can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/connections/{{connection_id}}
    • {{project}}/{{location}}/{{connection_id}}
    • {{location}}/{{connection_id}}

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

    $ pulumi import gcp:bigquery/connection:Connection default projects/{{project}}/locations/{{location}}/connections/{{connection_id}}
    $ pulumi import gcp:bigquery/connection:Connection default {{project}}/{{location}}/{{connection_id}}
    $ pulumi import gcp:bigquery/connection:Connection default {{location}}/{{connection_id}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Viewing docs for Google Cloud v9.23.0
    published on Thursday, May 7, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.