1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. datastream
  5. ConnectionProfile
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.datastream.ConnectionProfile

Explore with Pulumi AI

A set of reusable connection configurations to be used as a source or destination for a stream.

To get more information about ConnectionProfile, see:

Example Usage

Datastream Connection Profile Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.datastream.ConnectionProfile("default", {
    displayName: "Connection profile",
    location: "us-central1",
    connectionProfileId: "my-profile",
    gcsProfile: {
        bucket: "my-bucket",
        rootPath: "/path",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.datastream.ConnectionProfile("default",
    display_name="Connection profile",
    location="us-central1",
    connection_profile_id="my-profile",
    gcs_profile={
        "bucket": "my-bucket",
        "root_path": "/path",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datastream"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datastream.NewConnectionProfile(ctx, "default", &datastream.ConnectionProfileArgs{
			DisplayName:         pulumi.String("Connection profile"),
			Location:            pulumi.String("us-central1"),
			ConnectionProfileId: pulumi.String("my-profile"),
			GcsProfile: &datastream.ConnectionProfileGcsProfileArgs{
				Bucket:   pulumi.String("my-bucket"),
				RootPath: pulumi.String("/path"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Datastream.ConnectionProfile("default", new()
    {
        DisplayName = "Connection profile",
        Location = "us-central1",
        ConnectionProfileId = "my-profile",
        GcsProfile = new Gcp.Datastream.Inputs.ConnectionProfileGcsProfileArgs
        {
            Bucket = "my-bucket",
            RootPath = "/path",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.datastream.ConnectionProfile;
import com.pulumi.gcp.datastream.ConnectionProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfileGcsProfileArgs;
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 default_ = new ConnectionProfile("default", ConnectionProfileArgs.builder()
            .displayName("Connection profile")
            .location("us-central1")
            .connectionProfileId("my-profile")
            .gcsProfile(ConnectionProfileGcsProfileArgs.builder()
                .bucket("my-bucket")
                .rootPath("/path")
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:datastream:ConnectionProfile
    properties:
      displayName: Connection profile
      location: us-central1
      connectionProfileId: my-profile
      gcsProfile:
        bucket: my-bucket
        rootPath: /path
Copy

Datastream Connection Profile Postgresql Private Connection

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as random from "@pulumi/random";

const _default = new gcp.compute.Network("default", {
    name: "my-network",
    autoCreateSubnetworks: false,
});
const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
    name: "my-subnetwork",
    ipCidrRange: "10.1.0.0/16",
    region: "us-central1",
    network: _default.id,
});
const privateConnection = new gcp.datastream.PrivateConnection("private_connection", {
    displayName: "Private connection",
    location: "us-central1",
    privateConnectionId: "my-connection",
    vpcPeeringConfig: {
        vpc: _default.id,
        subnet: "10.0.0.0/29",
    },
});
const natVmIp = new gcp.compute.Address("nat_vm_ip", {name: "nat-vm-ip"});
const instance = new gcp.sql.DatabaseInstance("instance", {
    name: "my-instance",
    databaseVersion: "POSTGRES_14",
    region: "us-central1",
    settings: {
        tier: "db-f1-micro",
        ipConfiguration: {
            authorizedNetworks: [{
                value: natVmIp.address,
            }],
        },
    },
    deletionProtection: true,
});
const db = new gcp.sql.Database("db", {
    instance: instance.name,
    name: "db",
});
const pwd = new random.RandomPassword("pwd", {
    length: 16,
    special: false,
});
const user = new gcp.sql.User("user", {
    name: "user",
    instance: instance.name,
    password: pwd.result,
});
const natVm = new gcp.compute.Instance("nat_vm", {
    name: "nat-vm",
    machineType: "e2-medium",
    zone: "us-central1-a",
    desiredStatus: "RUNNING",
    bootDisk: {
        initializeParams: {
            image: "debian-cloud/debian-12",
        },
    },
    networkInterfaces: [{
        network: privateConnection.vpcPeeringConfig.apply(vpcPeeringConfig => vpcPeeringConfig.vpc),
        subnetwork: defaultSubnetwork.selfLink,
        accessConfigs: [{
            natIp: natVmIp.address,
        }],
    }],
    metadataStartupScript: pulumi.interpolate`#! /bin/bash
# See https://cloud.google.com/datastream/docs/private-connectivity#set-up-reverse-proxy
export DB_ADDR=${instance.publicIpAddress}
export DB_PORT=5432
echo 1 > /proc/sys/net/ipv4/ip_forward
md_url_prefix="http://169.254.169.254/computeMetadata/v1/instance"
vm_nic_ip="$(curl -H "Metadata-Flavor: Google" ${md_url_prefix}/network-interfaces/0/ip)"
iptables -t nat -F
iptables -t nat -A PREROUTING \
     -p tcp --dport $DB_PORT \
     -j DNAT \
     --to-destination $DB_ADDR
iptables -t nat -A POSTROUTING \
     -p tcp --dport $DB_PORT \
     -j SNAT \
     --to-source $vm_nic_ip
iptables-save
`,
});
const rules = new gcp.compute.Firewall("rules", {
    name: "ingress-rule",
    network: privateConnection.vpcPeeringConfig.apply(vpcPeeringConfig => vpcPeeringConfig.vpc),
    description: "Allow traffic into NAT VM",
    direction: "INGRESS",
    allows: [{
        protocol: "tcp",
        ports: ["5432"],
    }],
    sourceRanges: [privateConnection.vpcPeeringConfig.apply(vpcPeeringConfig => vpcPeeringConfig.subnet)],
});
const defaultConnectionProfile = new gcp.datastream.ConnectionProfile("default", {
    displayName: "Connection profile",
    location: "us-central1",
    connectionProfileId: "my-profile",
    postgresqlProfile: {
        hostname: natVm.networkInterfaces.apply(networkInterfaces => networkInterfaces[0].networkIp),
        username: user.name,
        password: user.password,
        database: db.name,
        port: 5432,
    },
    privateConnectivity: {
        privateConnection: privateConnection.id,
    },
});
Copy
import pulumi
import pulumi_gcp as gcp
import pulumi_random as random

default = gcp.compute.Network("default",
    name="my-network",
    auto_create_subnetworks=False)
default_subnetwork = gcp.compute.Subnetwork("default",
    name="my-subnetwork",
    ip_cidr_range="10.1.0.0/16",
    region="us-central1",
    network=default.id)
private_connection = gcp.datastream.PrivateConnection("private_connection",
    display_name="Private connection",
    location="us-central1",
    private_connection_id="my-connection",
    vpc_peering_config={
        "vpc": default.id,
        "subnet": "10.0.0.0/29",
    })
nat_vm_ip = gcp.compute.Address("nat_vm_ip", name="nat-vm-ip")
instance = gcp.sql.DatabaseInstance("instance",
    name="my-instance",
    database_version="POSTGRES_14",
    region="us-central1",
    settings={
        "tier": "db-f1-micro",
        "ip_configuration": {
            "authorized_networks": [{
                "value": nat_vm_ip.address,
            }],
        },
    },
    deletion_protection=True)
db = gcp.sql.Database("db",
    instance=instance.name,
    name="db")
pwd = random.RandomPassword("pwd",
    length=16,
    special=False)
user = gcp.sql.User("user",
    name="user",
    instance=instance.name,
    password=pwd.result)
nat_vm = gcp.compute.Instance("nat_vm",
    name="nat-vm",
    machine_type="e2-medium",
    zone="us-central1-a",
    desired_status="RUNNING",
    boot_disk={
        "initialize_params": {
            "image": "debian-cloud/debian-12",
        },
    },
    network_interfaces=[{
        "network": private_connection.vpc_peering_config.vpc,
        "subnetwork": default_subnetwork.self_link,
        "access_configs": [{
            "nat_ip": nat_vm_ip.address,
        }],
    }],
    metadata_startup_script=instance.public_ip_address.apply(lambda public_ip_address: f"""#! /bin/bash
# See https://cloud.google.com/datastream/docs/private-connectivity#set-up-reverse-proxy
export DB_ADDR={public_ip_address}
export DB_PORT=5432
echo 1 > /proc/sys/net/ipv4/ip_forward
md_url_prefix="http://169.254.169.254/computeMetadata/v1/instance"
vm_nic_ip="$(curl -H "Metadata-Flavor: Google" ${{md_url_prefix}}/network-interfaces/0/ip)"
iptables -t nat -F
iptables -t nat -A PREROUTING \
     -p tcp --dport $DB_PORT \
     -j DNAT \
     --to-destination $DB_ADDR
iptables -t nat -A POSTROUTING \
     -p tcp --dport $DB_PORT \
     -j SNAT \
     --to-source $vm_nic_ip
iptables-save
"""))
rules = gcp.compute.Firewall("rules",
    name="ingress-rule",
    network=private_connection.vpc_peering_config.vpc,
    description="Allow traffic into NAT VM",
    direction="INGRESS",
    allows=[{
        "protocol": "tcp",
        "ports": ["5432"],
    }],
    source_ranges=[private_connection.vpc_peering_config.subnet])
default_connection_profile = gcp.datastream.ConnectionProfile("default",
    display_name="Connection profile",
    location="us-central1",
    connection_profile_id="my-profile",
    postgresql_profile={
        "hostname": nat_vm.network_interfaces[0].network_ip,
        "username": user.name,
        "password": user.password,
        "database": db.name,
        "port": 5432,
    },
    private_connectivity={
        "private_connection": private_connection.id,
    })
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datastream"
	"github.com/pulumi/pulumi-gcp/sdk/v8/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 {
		_default, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
			Name:                  pulumi.String("my-network"),
			AutoCreateSubnetworks: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		defaultSubnetwork, err := compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
			Name:        pulumi.String("my-subnetwork"),
			IpCidrRange: pulumi.String("10.1.0.0/16"),
			Region:      pulumi.String("us-central1"),
			Network:     _default.ID(),
		})
		if err != nil {
			return err
		}
		privateConnection, err := datastream.NewPrivateConnection(ctx, "private_connection", &datastream.PrivateConnectionArgs{
			DisplayName:         pulumi.String("Private connection"),
			Location:            pulumi.String("us-central1"),
			PrivateConnectionId: pulumi.String("my-connection"),
			VpcPeeringConfig: &datastream.PrivateConnectionVpcPeeringConfigArgs{
				Vpc:    _default.ID(),
				Subnet: pulumi.String("10.0.0.0/29"),
			},
		})
		if err != nil {
			return err
		}
		natVmIp, err := compute.NewAddress(ctx, "nat_vm_ip", &compute.AddressArgs{
			Name: pulumi.String("nat-vm-ip"),
		})
		if err != nil {
			return err
		}
		instance, err := sql.NewDatabaseInstance(ctx, "instance", &sql.DatabaseInstanceArgs{
			Name:            pulumi.String("my-instance"),
			DatabaseVersion: pulumi.String("POSTGRES_14"),
			Region:          pulumi.String("us-central1"),
			Settings: &sql.DatabaseInstanceSettingsArgs{
				Tier: pulumi.String("db-f1-micro"),
				IpConfiguration: &sql.DatabaseInstanceSettingsIpConfigurationArgs{
					AuthorizedNetworks: sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArray{
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: natVmIp.Address,
						},
					},
				},
			},
			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.NewRandomPassword(ctx, "pwd", &random.RandomPasswordArgs{
			Length:  pulumi.Int(16),
			Special: pulumi.Bool(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
		}
		natVm, err := compute.NewInstance(ctx, "nat_vm", &compute.InstanceArgs{
			Name:          pulumi.String("nat-vm"),
			MachineType:   pulumi.String("e2-medium"),
			Zone:          pulumi.String("us-central1-a"),
			DesiredStatus: pulumi.String("RUNNING"),
			BootDisk: &compute.InstanceBootDiskArgs{
				InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
					Image: pulumi.String("debian-cloud/debian-12"),
				},
			},
			NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
				&compute.InstanceNetworkInterfaceArgs{
					Network: privateConnection.VpcPeeringConfig.ApplyT(func(vpcPeeringConfig datastream.PrivateConnectionVpcPeeringConfig) (*string, error) {
						return &vpcPeeringConfig.Vpc, nil
					}).(pulumi.StringPtrOutput),
					Subnetwork: defaultSubnetwork.SelfLink,
					AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
						&compute.InstanceNetworkInterfaceAccessConfigArgs{
							NatIp: natVmIp.Address,
						},
					},
				},
			},
			MetadataStartupScript: instance.PublicIpAddress.ApplyT(func(publicIpAddress string) (string, error) {
				return fmt.Sprintf(`#! /bin/bash
# See https://cloud.google.com/datastream/docs/private-connectivity#set-up-reverse-proxy
export DB_ADDR=%v
export DB_PORT=5432
echo 1 > /proc/sys/net/ipv4/ip_forward
md_url_prefix="http://169.254.169.254/computeMetadata/v1/instance"
vm_nic_ip="$(curl -H "Metadata-Flavor: Google" ${md_url_prefix}/network-interfaces/0/ip)"
iptables -t nat -F
iptables -t nat -A PREROUTING \
     -p tcp --dport $DB_PORT \
     -j DNAT \
     --to-destination $DB_ADDR
iptables -t nat -A POSTROUTING \
     -p tcp --dport $DB_PORT \
     -j SNAT \
     --to-source $vm_nic_ip
iptables-save
`, publicIpAddress), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewFirewall(ctx, "rules", &compute.FirewallArgs{
			Name: pulumi.String("ingress-rule"),
			Network: pulumi.String(privateConnection.VpcPeeringConfig.ApplyT(func(vpcPeeringConfig datastream.PrivateConnectionVpcPeeringConfig) (*string, error) {
				return &vpcPeeringConfig.Vpc, nil
			}).(pulumi.StringPtrOutput)),
			Description: pulumi.String("Allow traffic into NAT VM"),
			Direction:   pulumi.String("INGRESS"),
			Allows: compute.FirewallAllowArray{
				&compute.FirewallAllowArgs{
					Protocol: pulumi.String("tcp"),
					Ports: pulumi.StringArray{
						pulumi.String("5432"),
					},
				},
			},
			SourceRanges: pulumi.StringArray{
				pulumi.String(privateConnection.VpcPeeringConfig.ApplyT(func(vpcPeeringConfig datastream.PrivateConnectionVpcPeeringConfig) (*string, error) {
					return &vpcPeeringConfig.Subnet, nil
				}).(pulumi.StringPtrOutput)),
			},
		})
		if err != nil {
			return err
		}
		_, err = datastream.NewConnectionProfile(ctx, "default", &datastream.ConnectionProfileArgs{
			DisplayName:         pulumi.String("Connection profile"),
			Location:            pulumi.String("us-central1"),
			ConnectionProfileId: pulumi.String("my-profile"),
			PostgresqlProfile: &datastream.ConnectionProfilePostgresqlProfileArgs{
				Hostname: natVm.NetworkInterfaces.ApplyT(func(networkInterfaces []compute.InstanceNetworkInterface) (*string, error) {
					return &networkInterfaces[0].NetworkIp, nil
				}).(pulumi.StringPtrOutput),
				Username: user.Name,
				Password: user.Password,
				Database: db.Name,
				Port:     pulumi.Int(5432),
			},
			PrivateConnectivity: &datastream.ConnectionProfilePrivateConnectivityArgs{
				PrivateConnection: privateConnection.ID(),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Compute.Network("default", new()
    {
        Name = "my-network",
        AutoCreateSubnetworks = false,
    });

    var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
    {
        Name = "my-subnetwork",
        IpCidrRange = "10.1.0.0/16",
        Region = "us-central1",
        Network = @default.Id,
    });

    var privateConnection = new Gcp.Datastream.PrivateConnection("private_connection", new()
    {
        DisplayName = "Private connection",
        Location = "us-central1",
        PrivateConnectionId = "my-connection",
        VpcPeeringConfig = new Gcp.Datastream.Inputs.PrivateConnectionVpcPeeringConfigArgs
        {
            Vpc = @default.Id,
            Subnet = "10.0.0.0/29",
        },
    });

    var natVmIp = new Gcp.Compute.Address("nat_vm_ip", new()
    {
        Name = "nat-vm-ip",
    });

    var instance = new Gcp.Sql.DatabaseInstance("instance", new()
    {
        Name = "my-instance",
        DatabaseVersion = "POSTGRES_14",
        Region = "us-central1",
        Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
        {
            Tier = "db-f1-micro",
            IpConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationArgs
            {
                AuthorizedNetworks = new[]
                {
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = natVmIp.IPAddress,
                    },
                },
            },
        },
        DeletionProtection = true,
    });

    var db = new Gcp.Sql.Database("db", new()
    {
        Instance = instance.Name,
        Name = "db",
    });

    var pwd = new Random.RandomPassword("pwd", new()
    {
        Length = 16,
        Special = false,
    });

    var user = new Gcp.Sql.User("user", new()
    {
        Name = "user",
        Instance = instance.Name,
        Password = pwd.Result,
    });

    var natVm = new Gcp.Compute.Instance("nat_vm", new()
    {
        Name = "nat-vm",
        MachineType = "e2-medium",
        Zone = "us-central1-a",
        DesiredStatus = "RUNNING",
        BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
        {
            InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
            {
                Image = "debian-cloud/debian-12",
            },
        },
        NetworkInterfaces = new[]
        {
            new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
            {
                Network = privateConnection.VpcPeeringConfig.Apply(vpcPeeringConfig => vpcPeeringConfig.Vpc),
                Subnetwork = defaultSubnetwork.SelfLink,
                AccessConfigs = new[]
                {
                    new Gcp.Compute.Inputs.InstanceNetworkInterfaceAccessConfigArgs
                    {
                        NatIp = natVmIp.IPAddress,
                    },
                },
            },
        },
        MetadataStartupScript = instance.PublicIpAddress.Apply(publicIpAddress => @$"#! /bin/bash
# See https://cloud.google.com/datastream/docs/private-connectivity#set-up-reverse-proxy
export DB_ADDR={publicIpAddress}
export DB_PORT=5432
echo 1 > /proc/sys/net/ipv4/ip_forward
md_url_prefix=""http://169.254.169.254/computeMetadata/v1/instance""
vm_nic_ip=""$(curl -H ""Metadata-Flavor: Google"" ${{md_url_prefix}}/network-interfaces/0/ip)""
iptables -t nat -F
iptables -t nat -A PREROUTING \
     -p tcp --dport $DB_PORT \
     -j DNAT \
     --to-destination $DB_ADDR
iptables -t nat -A POSTROUTING \
     -p tcp --dport $DB_PORT \
     -j SNAT \
     --to-source $vm_nic_ip
iptables-save
"),
    });

    var rules = new Gcp.Compute.Firewall("rules", new()
    {
        Name = "ingress-rule",
        Network = privateConnection.VpcPeeringConfig.Apply(vpcPeeringConfig => vpcPeeringConfig.Vpc),
        Description = "Allow traffic into NAT VM",
        Direction = "INGRESS",
        Allows = new[]
        {
            new Gcp.Compute.Inputs.FirewallAllowArgs
            {
                Protocol = "tcp",
                Ports = new[]
                {
                    "5432",
                },
            },
        },
        SourceRanges = new[]
        {
            privateConnection.VpcPeeringConfig.Apply(vpcPeeringConfig => vpcPeeringConfig.Subnet),
        },
    });

    var defaultConnectionProfile = new Gcp.Datastream.ConnectionProfile("default", new()
    {
        DisplayName = "Connection profile",
        Location = "us-central1",
        ConnectionProfileId = "my-profile",
        PostgresqlProfile = new Gcp.Datastream.Inputs.ConnectionProfilePostgresqlProfileArgs
        {
            Hostname = natVm.NetworkInterfaces.Apply(networkInterfaces => networkInterfaces[0].NetworkIp),
            Username = user.Name,
            Password = user.Password,
            Database = db.Name,
            Port = 5432,
        },
        PrivateConnectivity = new Gcp.Datastream.Inputs.ConnectionProfilePrivateConnectivityArgs
        {
            PrivateConnection = privateConnection.Id,
        },
    });

});
Copy
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.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.datastream.PrivateConnection;
import com.pulumi.gcp.datastream.PrivateConnectionArgs;
import com.pulumi.gcp.datastream.inputs.PrivateConnectionVpcPeeringConfigArgs;
import com.pulumi.gcp.compute.Address;
import com.pulumi.gcp.compute.AddressArgs;
import com.pulumi.gcp.sql.DatabaseInstance;
import com.pulumi.gcp.sql.DatabaseInstanceArgs;
import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsArgs;
import com.pulumi.gcp.sql.inputs.DatabaseInstanceSettingsIpConfigurationArgs;
import com.pulumi.gcp.sql.Database;
import com.pulumi.gcp.sql.DatabaseArgs;
import com.pulumi.random.RandomPassword;
import com.pulumi.random.RandomPasswordArgs;
import com.pulumi.gcp.sql.User;
import com.pulumi.gcp.sql.UserArgs;
import com.pulumi.gcp.compute.Instance;
import com.pulumi.gcp.compute.InstanceArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
import com.pulumi.gcp.compute.Firewall;
import com.pulumi.gcp.compute.FirewallArgs;
import com.pulumi.gcp.compute.inputs.FirewallAllowArgs;
import com.pulumi.gcp.datastream.ConnectionProfile;
import com.pulumi.gcp.datastream.ConnectionProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfilePostgresqlProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfilePrivateConnectivityArgs;
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 default_ = new Network("default", NetworkArgs.builder()
            .name("my-network")
            .autoCreateSubnetworks(false)
            .build());

        var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
            .name("my-subnetwork")
            .ipCidrRange("10.1.0.0/16")
            .region("us-central1")
            .network(default_.id())
            .build());

        var privateConnection = new PrivateConnection("privateConnection", PrivateConnectionArgs.builder()
            .displayName("Private connection")
            .location("us-central1")
            .privateConnectionId("my-connection")
            .vpcPeeringConfig(PrivateConnectionVpcPeeringConfigArgs.builder()
                .vpc(default_.id())
                .subnet("10.0.0.0/29")
                .build())
            .build());

        var natVmIp = new Address("natVmIp", AddressArgs.builder()
            .name("nat-vm-ip")
            .build());

        var instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
            .name("my-instance")
            .databaseVersion("POSTGRES_14")
            .region("us-central1")
            .settings(DatabaseInstanceSettingsArgs.builder()
                .tier("db-f1-micro")
                .ipConfiguration(DatabaseInstanceSettingsIpConfigurationArgs.builder()
                    .authorizedNetworks(DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                        .value(natVmIp.address())
                        .build())
                    .build())
                .build())
            .deletionProtection(true)
            .build());

        var db = new Database("db", DatabaseArgs.builder()
            .instance(instance.name())
            .name("db")
            .build());

        var pwd = new RandomPassword("pwd", RandomPasswordArgs.builder()
            .length(16)
            .special(false)
            .build());

        var user = new User("user", UserArgs.builder()
            .name("user")
            .instance(instance.name())
            .password(pwd.result())
            .build());

        var natVm = new Instance("natVm", InstanceArgs.builder()
            .name("nat-vm")
            .machineType("e2-medium")
            .zone("us-central1-a")
            .desiredStatus("RUNNING")
            .bootDisk(InstanceBootDiskArgs.builder()
                .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
                    .image("debian-cloud/debian-12")
                    .build())
                .build())
            .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
                .network(privateConnection.vpcPeeringConfig().applyValue(_vpcPeeringConfig -> _vpcPeeringConfig.vpc()))
                .subnetwork(defaultSubnetwork.selfLink())
                .accessConfigs(InstanceNetworkInterfaceAccessConfigArgs.builder()
                    .natIp(natVmIp.address())
                    .build())
                .build())
            .metadataStartupScript(instance.publicIpAddress().applyValue(_publicIpAddress -> """
#! /bin/bash
# See https://cloud.google.com/datastream/docs/private-connectivity#set-up-reverse-proxy
export DB_ADDR=%s
export DB_PORT=5432
echo 1 > /proc/sys/net/ipv4/ip_forward
md_url_prefix="http://169.254.169.254/computeMetadata/v1/instance"
vm_nic_ip="$(curl -H "Metadata-Flavor: Google" ${md_url_prefix}/network-interfaces/0/ip)"
iptables -t nat -F
iptables -t nat -A PREROUTING \
     -p tcp --dport $DB_PORT \
     -j DNAT \
     --to-destination $DB_ADDR
iptables -t nat -A POSTROUTING \
     -p tcp --dport $DB_PORT \
     -j SNAT \
     --to-source $vm_nic_ip
iptables-save
", _publicIpAddress)))
            .build());

        var rules = new Firewall("rules", FirewallArgs.builder()
            .name("ingress-rule")
            .network(privateConnection.vpcPeeringConfig().applyValue(_vpcPeeringConfig -> _vpcPeeringConfig.vpc()))
            .description("Allow traffic into NAT VM")
            .direction("INGRESS")
            .allows(FirewallAllowArgs.builder()
                .protocol("tcp")
                .ports("5432")
                .build())
            .sourceRanges(privateConnection.vpcPeeringConfig().applyValue(_vpcPeeringConfig -> _vpcPeeringConfig.subnet()))
            .build());

        var defaultConnectionProfile = new ConnectionProfile("defaultConnectionProfile", ConnectionProfileArgs.builder()
            .displayName("Connection profile")
            .location("us-central1")
            .connectionProfileId("my-profile")
            .postgresqlProfile(ConnectionProfilePostgresqlProfileArgs.builder()
                .hostname(natVm.networkInterfaces().applyValue(_networkInterfaces -> _networkInterfaces[0].networkIp()))
                .username(user.name())
                .password(user.password())
                .database(db.name())
                .port(5432)
                .build())
            .privateConnectivity(ConnectionProfilePrivateConnectivityArgs.builder()
                .privateConnection(privateConnection.id())
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:compute:Network
    properties:
      name: my-network
      autoCreateSubnetworks: false
  defaultSubnetwork:
    type: gcp:compute:Subnetwork
    name: default
    properties:
      name: my-subnetwork
      ipCidrRange: 10.1.0.0/16
      region: us-central1
      network: ${default.id}
  privateConnection:
    type: gcp:datastream:PrivateConnection
    name: private_connection
    properties:
      displayName: Private connection
      location: us-central1
      privateConnectionId: my-connection
      vpcPeeringConfig:
        vpc: ${default.id}
        subnet: 10.0.0.0/29
  instance:
    type: gcp:sql:DatabaseInstance
    properties:
      name: my-instance
      databaseVersion: POSTGRES_14
      region: us-central1
      settings:
        tier: db-f1-micro
        ipConfiguration:
          authorizedNetworks:
            - value: ${natVmIp.address}
      deletionProtection: true
  db:
    type: gcp:sql:Database
    properties:
      instance: ${instance.name}
      name: db
  pwd:
    type: random:RandomPassword
    properties:
      length: 16
      special: false
  user:
    type: gcp:sql:User
    properties:
      name: user
      instance: ${instance.name}
      password: ${pwd.result}
  natVmIp:
    type: gcp:compute:Address
    name: nat_vm_ip
    properties:
      name: nat-vm-ip
  natVm:
    type: gcp:compute:Instance
    name: nat_vm
    properties:
      name: nat-vm
      machineType: e2-medium
      zone: us-central1-a
      desiredStatus: RUNNING
      bootDisk:
        initializeParams:
          image: debian-cloud/debian-12
      networkInterfaces:
        - network: ${privateConnection.vpcPeeringConfig.vpc}
          subnetwork: ${defaultSubnetwork.selfLink}
          accessConfigs:
            - natIp: ${natVmIp.address}
      metadataStartupScript: |
        #! /bin/bash
        # See https://cloud.google.com/datastream/docs/private-connectivity#set-up-reverse-proxy
        export DB_ADDR=${instance.publicIpAddress}
        export DB_PORT=5432
        echo 1 > /proc/sys/net/ipv4/ip_forward
        md_url_prefix="http://169.254.169.254/computeMetadata/v1/instance"
        vm_nic_ip="$(curl -H "Metadata-Flavor: Google" $${md_url_prefix}/network-interfaces/0/ip)"
        iptables -t nat -F
        iptables -t nat -A PREROUTING \
             -p tcp --dport $DB_PORT \
             -j DNAT \
             --to-destination $DB_ADDR
        iptables -t nat -A POSTROUTING \
             -p tcp --dport $DB_PORT \
             -j SNAT \
             --to-source $vm_nic_ip
        iptables-save        
  rules:
    type: gcp:compute:Firewall
    properties:
      name: ingress-rule
      network: ${privateConnection.vpcPeeringConfig.vpc}
      description: Allow traffic into NAT VM
      direction: INGRESS
      allows:
        - protocol: tcp
          ports:
            - '5432'
      sourceRanges:
        - ${privateConnection.vpcPeeringConfig.subnet}
  defaultConnectionProfile:
    type: gcp:datastream:ConnectionProfile
    name: default
    properties:
      displayName: Connection profile
      location: us-central1
      connectionProfileId: my-profile
      postgresqlProfile:
        hostname: ${natVm.networkInterfaces[0].networkIp}
        username: ${user.name}
        password: ${user.password}
        database: ${db.name}
        port: 5432
      privateConnectivity:
        privateConnection: ${privateConnection.id}
Copy

Datastream Connection Profile Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.datastream.ConnectionProfile("default", {
    displayName: "Connection profile",
    location: "us-central1",
    connectionProfileId: "my-profile",
    gcsProfile: {
        bucket: "my-bucket",
        rootPath: "/path",
    },
    forwardSshConnectivity: {
        hostname: "google.com",
        username: "my-user",
        port: 8022,
        password: "swordfish",
    },
    labels: {
        key: "value",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.datastream.ConnectionProfile("default",
    display_name="Connection profile",
    location="us-central1",
    connection_profile_id="my-profile",
    gcs_profile={
        "bucket": "my-bucket",
        "root_path": "/path",
    },
    forward_ssh_connectivity={
        "hostname": "google.com",
        "username": "my-user",
        "port": 8022,
        "password": "swordfish",
    },
    labels={
        "key": "value",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datastream"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datastream.NewConnectionProfile(ctx, "default", &datastream.ConnectionProfileArgs{
			DisplayName:         pulumi.String("Connection profile"),
			Location:            pulumi.String("us-central1"),
			ConnectionProfileId: pulumi.String("my-profile"),
			GcsProfile: &datastream.ConnectionProfileGcsProfileArgs{
				Bucket:   pulumi.String("my-bucket"),
				RootPath: pulumi.String("/path"),
			},
			ForwardSshConnectivity: &datastream.ConnectionProfileForwardSshConnectivityArgs{
				Hostname: pulumi.String("google.com"),
				Username: pulumi.String("my-user"),
				Port:     pulumi.Int(8022),
				Password: pulumi.String("swordfish"),
			},
			Labels: pulumi.StringMap{
				"key": pulumi.String("value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Datastream.ConnectionProfile("default", new()
    {
        DisplayName = "Connection profile",
        Location = "us-central1",
        ConnectionProfileId = "my-profile",
        GcsProfile = new Gcp.Datastream.Inputs.ConnectionProfileGcsProfileArgs
        {
            Bucket = "my-bucket",
            RootPath = "/path",
        },
        ForwardSshConnectivity = new Gcp.Datastream.Inputs.ConnectionProfileForwardSshConnectivityArgs
        {
            Hostname = "google.com",
            Username = "my-user",
            Port = 8022,
            Password = "swordfish",
        },
        Labels = 
        {
            { "key", "value" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.datastream.ConnectionProfile;
import com.pulumi.gcp.datastream.ConnectionProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfileGcsProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfileForwardSshConnectivityArgs;
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 default_ = new ConnectionProfile("default", ConnectionProfileArgs.builder()
            .displayName("Connection profile")
            .location("us-central1")
            .connectionProfileId("my-profile")
            .gcsProfile(ConnectionProfileGcsProfileArgs.builder()
                .bucket("my-bucket")
                .rootPath("/path")
                .build())
            .forwardSshConnectivity(ConnectionProfileForwardSshConnectivityArgs.builder()
                .hostname("google.com")
                .username("my-user")
                .port(8022)
                .password("swordfish")
                .build())
            .labels(Map.of("key", "value"))
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:datastream:ConnectionProfile
    properties:
      displayName: Connection profile
      location: us-central1
      connectionProfileId: my-profile
      gcsProfile:
        bucket: my-bucket
        rootPath: /path
      forwardSshConnectivity:
        hostname: google.com
        username: my-user
        port: 8022
        password: swordfish
      labels:
        key: value
Copy

Datastream Connection Profile Postgres

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-instance",
    databaseVersion: "POSTGRES_14",
    region: "us-central1",
    settings: {
        tier: "db-f1-micro",
        ipConfiguration: {
            authorizedNetworks: [
                {
                    value: "34.71.242.81",
                },
                {
                    value: "34.72.28.29",
                },
                {
                    value: "34.67.6.157",
                },
                {
                    value: "34.67.234.134",
                },
                {
                    value: "34.72.239.218",
                },
            ],
        },
    },
    deletionProtection: true,
});
const db = new gcp.sql.Database("db", {
    instance: instance.name,
    name: "db",
});
const pwd = new random.RandomPassword("pwd", {
    length: 16,
    special: false,
});
const user = new gcp.sql.User("user", {
    name: "user",
    instance: instance.name,
    password: pwd.result,
});
const _default = new gcp.datastream.ConnectionProfile("default", {
    displayName: "Connection profile",
    location: "us-central1",
    connectionProfileId: "my-profile",
    postgresqlProfile: {
        hostname: instance.publicIpAddress,
        username: user.name,
        password: user.password,
        database: db.name,
    },
});
Copy
import pulumi
import pulumi_gcp as gcp
import pulumi_random as random

instance = gcp.sql.DatabaseInstance("instance",
    name="my-instance",
    database_version="POSTGRES_14",
    region="us-central1",
    settings={
        "tier": "db-f1-micro",
        "ip_configuration": {
            "authorized_networks": [
                {
                    "value": "34.71.242.81",
                },
                {
                    "value": "34.72.28.29",
                },
                {
                    "value": "34.67.6.157",
                },
                {
                    "value": "34.67.234.134",
                },
                {
                    "value": "34.72.239.218",
                },
            ],
        },
    },
    deletion_protection=True)
db = gcp.sql.Database("db",
    instance=instance.name,
    name="db")
pwd = random.RandomPassword("pwd",
    length=16,
    special=False)
user = gcp.sql.User("user",
    name="user",
    instance=instance.name,
    password=pwd.result)
default = gcp.datastream.ConnectionProfile("default",
    display_name="Connection profile",
    location="us-central1",
    connection_profile_id="my-profile",
    postgresql_profile={
        "hostname": instance.public_ip_address,
        "username": user.name,
        "password": user.password,
        "database": db.name,
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datastream"
	"github.com/pulumi/pulumi-gcp/sdk/v8/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-instance"),
			DatabaseVersion: pulumi.String("POSTGRES_14"),
			Region:          pulumi.String("us-central1"),
			Settings: &sql.DatabaseInstanceSettingsArgs{
				Tier: pulumi.String("db-f1-micro"),
				IpConfiguration: &sql.DatabaseInstanceSettingsIpConfigurationArgs{
					AuthorizedNetworks: sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArray{
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.71.242.81"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.72.28.29"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.67.6.157"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.67.234.134"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.72.239.218"),
						},
					},
				},
			},
			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.NewRandomPassword(ctx, "pwd", &random.RandomPasswordArgs{
			Length:  pulumi.Int(16),
			Special: pulumi.Bool(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 = datastream.NewConnectionProfile(ctx, "default", &datastream.ConnectionProfileArgs{
			DisplayName:         pulumi.String("Connection profile"),
			Location:            pulumi.String("us-central1"),
			ConnectionProfileId: pulumi.String("my-profile"),
			PostgresqlProfile: &datastream.ConnectionProfilePostgresqlProfileArgs{
				Hostname: instance.PublicIpAddress,
				Username: user.Name,
				Password: user.Password,
				Database: db.Name,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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-instance",
        DatabaseVersion = "POSTGRES_14",
        Region = "us-central1",
        Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
        {
            Tier = "db-f1-micro",
            IpConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationArgs
            {
                AuthorizedNetworks = new[]
                {
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.71.242.81",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.72.28.29",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.67.6.157",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.67.234.134",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.72.239.218",
                    },
                },
            },
        },
        DeletionProtection = true,
    });

    var db = new Gcp.Sql.Database("db", new()
    {
        Instance = instance.Name,
        Name = "db",
    });

    var pwd = new Random.RandomPassword("pwd", new()
    {
        Length = 16,
        Special = false,
    });

    var user = new Gcp.Sql.User("user", new()
    {
        Name = "user",
        Instance = instance.Name,
        Password = pwd.Result,
    });

    var @default = new Gcp.Datastream.ConnectionProfile("default", new()
    {
        DisplayName = "Connection profile",
        Location = "us-central1",
        ConnectionProfileId = "my-profile",
        PostgresqlProfile = new Gcp.Datastream.Inputs.ConnectionProfilePostgresqlProfileArgs
        {
            Hostname = instance.PublicIpAddress,
            Username = user.Name,
            Password = user.Password,
            Database = db.Name,
        },
    });

});
Copy
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.inputs.DatabaseInstanceSettingsIpConfigurationArgs;
import com.pulumi.gcp.sql.Database;
import com.pulumi.gcp.sql.DatabaseArgs;
import com.pulumi.random.RandomPassword;
import com.pulumi.random.RandomPasswordArgs;
import com.pulumi.gcp.sql.User;
import com.pulumi.gcp.sql.UserArgs;
import com.pulumi.gcp.datastream.ConnectionProfile;
import com.pulumi.gcp.datastream.ConnectionProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfilePostgresqlProfileArgs;
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-instance")
            .databaseVersion("POSTGRES_14")
            .region("us-central1")
            .settings(DatabaseInstanceSettingsArgs.builder()
                .tier("db-f1-micro")
                .ipConfiguration(DatabaseInstanceSettingsIpConfigurationArgs.builder()
                    .authorizedNetworks(                    
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.71.242.81")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.72.28.29")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.67.6.157")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.67.234.134")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.72.239.218")
                            .build())
                    .build())
                .build())
            .deletionProtection(true)
            .build());

        var db = new Database("db", DatabaseArgs.builder()
            .instance(instance.name())
            .name("db")
            .build());

        var pwd = new RandomPassword("pwd", RandomPasswordArgs.builder()
            .length(16)
            .special(false)
            .build());

        var user = new User("user", UserArgs.builder()
            .name("user")
            .instance(instance.name())
            .password(pwd.result())
            .build());

        var default_ = new ConnectionProfile("default", ConnectionProfileArgs.builder()
            .displayName("Connection profile")
            .location("us-central1")
            .connectionProfileId("my-profile")
            .postgresqlProfile(ConnectionProfilePostgresqlProfileArgs.builder()
                .hostname(instance.publicIpAddress())
                .username(user.name())
                .password(user.password())
                .database(db.name())
                .build())
            .build());

    }
}
Copy
resources:
  instance:
    type: gcp:sql:DatabaseInstance
    properties:
      name: my-instance
      databaseVersion: POSTGRES_14
      region: us-central1
      settings:
        tier: db-f1-micro
        ipConfiguration:
          authorizedNetworks:
            - value: 34.71.242.81
            - value: 34.72.28.29
            - value: 34.67.6.157
            - value: 34.67.234.134
            - value: 34.72.239.218
      deletionProtection: true
  db:
    type: gcp:sql:Database
    properties:
      instance: ${instance.name}
      name: db
  pwd:
    type: random:RandomPassword
    properties:
      length: 16
      special: false
  user:
    type: gcp:sql:User
    properties:
      name: user
      instance: ${instance.name}
      password: ${pwd.result}
  default:
    type: gcp:datastream:ConnectionProfile
    properties:
      displayName: Connection profile
      location: us-central1
      connectionProfileId: my-profile
      postgresqlProfile:
        hostname: ${instance.publicIpAddress}
        username: ${user.name}
        password: ${user.password}
        database: ${db.name}
Copy

Datastream Connection Profile Sql Server

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const instance = new gcp.sql.DatabaseInstance("instance", {
    name: "sql-server",
    databaseVersion: "SQLSERVER_2019_STANDARD",
    region: "us-central1",
    rootPassword: "root-password",
    deletionProtection: true,
    settings: {
        tier: "db-custom-2-4096",
        ipConfiguration: {
            authorizedNetworks: [
                {
                    value: "34.71.242.81",
                },
                {
                    value: "34.72.28.29",
                },
                {
                    value: "34.67.6.157",
                },
                {
                    value: "34.67.234.134",
                },
                {
                    value: "34.72.239.218",
                },
            ],
        },
    },
});
const db = new gcp.sql.Database("db", {
    name: "db",
    instance: instance.name,
});
const user = new gcp.sql.User("user", {
    name: "user",
    instance: instance.name,
    password: "password",
});
const _default = new gcp.datastream.ConnectionProfile("default", {
    displayName: "SQL Server Source",
    location: "us-central1",
    connectionProfileId: "source-profile",
    sqlServerProfile: {
        hostname: instance.publicIpAddress,
        port: 1433,
        username: user.name,
        password: user.password,
        database: db.name,
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

instance = gcp.sql.DatabaseInstance("instance",
    name="sql-server",
    database_version="SQLSERVER_2019_STANDARD",
    region="us-central1",
    root_password="root-password",
    deletion_protection=True,
    settings={
        "tier": "db-custom-2-4096",
        "ip_configuration": {
            "authorized_networks": [
                {
                    "value": "34.71.242.81",
                },
                {
                    "value": "34.72.28.29",
                },
                {
                    "value": "34.67.6.157",
                },
                {
                    "value": "34.67.234.134",
                },
                {
                    "value": "34.72.239.218",
                },
            ],
        },
    })
db = gcp.sql.Database("db",
    name="db",
    instance=instance.name)
user = gcp.sql.User("user",
    name="user",
    instance=instance.name,
    password="password")
default = gcp.datastream.ConnectionProfile("default",
    display_name="SQL Server Source",
    location="us-central1",
    connection_profile_id="source-profile",
    sql_server_profile={
        "hostname": instance.public_ip_address,
        "port": 1433,
        "username": user.name,
        "password": user.password,
        "database": db.name,
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datastream"
	"github.com/pulumi/pulumi-gcp/sdk/v8/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("sql-server"),
			DatabaseVersion:    pulumi.String("SQLSERVER_2019_STANDARD"),
			Region:             pulumi.String("us-central1"),
			RootPassword:       pulumi.String("root-password"),
			DeletionProtection: pulumi.Bool(true),
			Settings: &sql.DatabaseInstanceSettingsArgs{
				Tier: pulumi.String("db-custom-2-4096"),
				IpConfiguration: &sql.DatabaseInstanceSettingsIpConfigurationArgs{
					AuthorizedNetworks: sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArray{
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.71.242.81"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.72.28.29"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.67.6.157"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.67.234.134"),
						},
						&sql.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs{
							Value: pulumi.String("34.72.239.218"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		db, err := sql.NewDatabase(ctx, "db", &sql.DatabaseArgs{
			Name:     pulumi.String("db"),
			Instance: instance.Name,
		})
		if err != nil {
			return err
		}
		user, err := sql.NewUser(ctx, "user", &sql.UserArgs{
			Name:     pulumi.String("user"),
			Instance: instance.Name,
			Password: pulumi.String("password"),
		})
		if err != nil {
			return err
		}
		_, err = datastream.NewConnectionProfile(ctx, "default", &datastream.ConnectionProfileArgs{
			DisplayName:         pulumi.String("SQL Server Source"),
			Location:            pulumi.String("us-central1"),
			ConnectionProfileId: pulumi.String("source-profile"),
			SqlServerProfile: &datastream.ConnectionProfileSqlServerProfileArgs{
				Hostname: instance.PublicIpAddress,
				Port:     pulumi.Int(1433),
				Username: user.Name,
				Password: user.Password,
				Database: db.Name,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 = "sql-server",
        DatabaseVersion = "SQLSERVER_2019_STANDARD",
        Region = "us-central1",
        RootPassword = "root-password",
        DeletionProtection = true,
        Settings = new Gcp.Sql.Inputs.DatabaseInstanceSettingsArgs
        {
            Tier = "db-custom-2-4096",
            IpConfiguration = new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationArgs
            {
                AuthorizedNetworks = new[]
                {
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.71.242.81",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.72.28.29",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.67.6.157",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.67.234.134",
                    },
                    new Gcp.Sql.Inputs.DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs
                    {
                        Value = "34.72.239.218",
                    },
                },
            },
        },
    });

    var db = new Gcp.Sql.Database("db", new()
    {
        Name = "db",
        Instance = instance.Name,
    });

    var user = new Gcp.Sql.User("user", new()
    {
        Name = "user",
        Instance = instance.Name,
        Password = "password",
    });

    var @default = new Gcp.Datastream.ConnectionProfile("default", new()
    {
        DisplayName = "SQL Server Source",
        Location = "us-central1",
        ConnectionProfileId = "source-profile",
        SqlServerProfile = new Gcp.Datastream.Inputs.ConnectionProfileSqlServerProfileArgs
        {
            Hostname = instance.PublicIpAddress,
            Port = 1433,
            Username = user.Name,
            Password = user.Password,
            Database = db.Name,
        },
    });

});
Copy
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.inputs.DatabaseInstanceSettingsIpConfigurationArgs;
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.datastream.ConnectionProfile;
import com.pulumi.gcp.datastream.ConnectionProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfileSqlServerProfileArgs;
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("sql-server")
            .databaseVersion("SQLSERVER_2019_STANDARD")
            .region("us-central1")
            .rootPassword("root-password")
            .deletionProtection(true)
            .settings(DatabaseInstanceSettingsArgs.builder()
                .tier("db-custom-2-4096")
                .ipConfiguration(DatabaseInstanceSettingsIpConfigurationArgs.builder()
                    .authorizedNetworks(                    
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.71.242.81")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.72.28.29")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.67.6.157")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.67.234.134")
                            .build(),
                        DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs.builder()
                            .value("34.72.239.218")
                            .build())
                    .build())
                .build())
            .build());

        var db = new Database("db", DatabaseArgs.builder()
            .name("db")
            .instance(instance.name())
            .build());

        var user = new User("user", UserArgs.builder()
            .name("user")
            .instance(instance.name())
            .password("password")
            .build());

        var default_ = new ConnectionProfile("default", ConnectionProfileArgs.builder()
            .displayName("SQL Server Source")
            .location("us-central1")
            .connectionProfileId("source-profile")
            .sqlServerProfile(ConnectionProfileSqlServerProfileArgs.builder()
                .hostname(instance.publicIpAddress())
                .port(1433)
                .username(user.name())
                .password(user.password())
                .database(db.name())
                .build())
            .build());

    }
}
Copy
resources:
  instance:
    type: gcp:sql:DatabaseInstance
    properties:
      name: sql-server
      databaseVersion: SQLSERVER_2019_STANDARD
      region: us-central1
      rootPassword: root-password
      deletionProtection: true
      settings:
        tier: db-custom-2-4096
        ipConfiguration:
          authorizedNetworks:
            - value: 34.71.242.81
            - value: 34.72.28.29
            - value: 34.67.6.157
            - value: 34.67.234.134
            - value: 34.72.239.218
  db:
    type: gcp:sql:Database
    properties:
      name: db
      instance: ${instance.name}
  user:
    type: gcp:sql:User
    properties:
      name: user
      instance: ${instance.name}
      password: password
  default:
    type: gcp:datastream:ConnectionProfile
    properties:
      displayName: SQL Server Source
      location: us-central1
      connectionProfileId: source-profile
      sqlServerProfile:
        hostname: ${instance.publicIpAddress}
        port: 1433
        username: ${user.name}
        password: ${user.password}
        database: ${db.name}
Copy

Datastream Connection Profile Postgres Secret Manager

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.datastream.ConnectionProfile("default", {
    displayName: "Postgres Source With Secret Manager",
    location: "us-central1",
    connectionProfileId: "source-profile",
    createWithoutValidation: true,
    postgresqlProfile: {
        hostname: "fake-hostname",
        port: 3306,
        username: "fake-username",
        secretManagerStoredPassword: "projects/fake-project/secrets/fake-secret/versions/1",
        database: "fake-database",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.datastream.ConnectionProfile("default",
    display_name="Postgres Source With Secret Manager",
    location="us-central1",
    connection_profile_id="source-profile",
    create_without_validation=True,
    postgresql_profile={
        "hostname": "fake-hostname",
        "port": 3306,
        "username": "fake-username",
        "secret_manager_stored_password": "projects/fake-project/secrets/fake-secret/versions/1",
        "database": "fake-database",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datastream"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datastream.NewConnectionProfile(ctx, "default", &datastream.ConnectionProfileArgs{
			DisplayName:             pulumi.String("Postgres Source With Secret Manager"),
			Location:                pulumi.String("us-central1"),
			ConnectionProfileId:     pulumi.String("source-profile"),
			CreateWithoutValidation: pulumi.Bool(true),
			PostgresqlProfile: &datastream.ConnectionProfilePostgresqlProfileArgs{
				Hostname:                    pulumi.String("fake-hostname"),
				Port:                        pulumi.Int(3306),
				Username:                    pulumi.String("fake-username"),
				SecretManagerStoredPassword: pulumi.String("projects/fake-project/secrets/fake-secret/versions/1"),
				Database:                    pulumi.String("fake-database"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Datastream.ConnectionProfile("default", new()
    {
        DisplayName = "Postgres Source With Secret Manager",
        Location = "us-central1",
        ConnectionProfileId = "source-profile",
        CreateWithoutValidation = true,
        PostgresqlProfile = new Gcp.Datastream.Inputs.ConnectionProfilePostgresqlProfileArgs
        {
            Hostname = "fake-hostname",
            Port = 3306,
            Username = "fake-username",
            SecretManagerStoredPassword = "projects/fake-project/secrets/fake-secret/versions/1",
            Database = "fake-database",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.datastream.ConnectionProfile;
import com.pulumi.gcp.datastream.ConnectionProfileArgs;
import com.pulumi.gcp.datastream.inputs.ConnectionProfilePostgresqlProfileArgs;
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 default_ = new ConnectionProfile("default", ConnectionProfileArgs.builder()
            .displayName("Postgres Source With Secret Manager")
            .location("us-central1")
            .connectionProfileId("source-profile")
            .createWithoutValidation(true)
            .postgresqlProfile(ConnectionProfilePostgresqlProfileArgs.builder()
                .hostname("fake-hostname")
                .port(3306)
                .username("fake-username")
                .secretManagerStoredPassword("projects/fake-project/secrets/fake-secret/versions/1")
                .database("fake-database")
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:datastream:ConnectionProfile
    properties:
      displayName: Postgres Source With Secret Manager
      location: us-central1
      connectionProfileId: source-profile
      createWithoutValidation: true
      postgresqlProfile:
        hostname: fake-hostname
        port: 3306
        username: fake-username
        secretManagerStoredPassword: projects/fake-project/secrets/fake-secret/versions/1
        database: fake-database
Copy

Create ConnectionProfile Resource

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

Constructor syntax

new ConnectionProfile(name: string, args: ConnectionProfileArgs, opts?: CustomResourceOptions);
@overload
def ConnectionProfile(resource_name: str,
                      args: ConnectionProfileArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def ConnectionProfile(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      display_name: Optional[str] = None,
                      connection_profile_id: Optional[str] = None,
                      location: Optional[str] = None,
                      labels: Optional[Mapping[str, str]] = None,
                      forward_ssh_connectivity: Optional[ConnectionProfileForwardSshConnectivityArgs] = None,
                      gcs_profile: Optional[ConnectionProfileGcsProfileArgs] = None,
                      bigquery_profile: Optional[ConnectionProfileBigqueryProfileArgs] = None,
                      create_without_validation: Optional[bool] = None,
                      mysql_profile: Optional[ConnectionProfileMysqlProfileArgs] = None,
                      oracle_profile: Optional[ConnectionProfileOracleProfileArgs] = None,
                      postgresql_profile: Optional[ConnectionProfilePostgresqlProfileArgs] = None,
                      private_connectivity: Optional[ConnectionProfilePrivateConnectivityArgs] = None,
                      project: Optional[str] = None,
                      salesforce_profile: Optional[ConnectionProfileSalesforceProfileArgs] = None,
                      sql_server_profile: Optional[ConnectionProfileSqlServerProfileArgs] = None)
func NewConnectionProfile(ctx *Context, name string, args ConnectionProfileArgs, opts ...ResourceOption) (*ConnectionProfile, error)
public ConnectionProfile(string name, ConnectionProfileArgs args, CustomResourceOptions? opts = null)
public ConnectionProfile(String name, ConnectionProfileArgs args)
public ConnectionProfile(String name, ConnectionProfileArgs args, CustomResourceOptions options)
type: gcp:datastream:ConnectionProfile
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConnectionProfileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConnectionProfileArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConnectionProfileArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConnectionProfileArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConnectionProfileArgs
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 gcpConnectionProfileResource = new Gcp.Datastream.ConnectionProfile("gcpConnectionProfileResource", new()
{
    DisplayName = "string",
    ConnectionProfileId = "string",
    Location = "string",
    Labels = 
    {
        { "string", "string" },
    },
    ForwardSshConnectivity = new Gcp.Datastream.Inputs.ConnectionProfileForwardSshConnectivityArgs
    {
        Hostname = "string",
        Username = "string",
        Password = "string",
        Port = 0,
        PrivateKey = "string",
    },
    GcsProfile = new Gcp.Datastream.Inputs.ConnectionProfileGcsProfileArgs
    {
        Bucket = "string",
        RootPath = "string",
    },
    BigqueryProfile = null,
    CreateWithoutValidation = false,
    MysqlProfile = new Gcp.Datastream.Inputs.ConnectionProfileMysqlProfileArgs
    {
        Hostname = "string",
        Username = "string",
        Password = "string",
        Port = 0,
        SecretManagerStoredPassword = "string",
        SslConfig = new Gcp.Datastream.Inputs.ConnectionProfileMysqlProfileSslConfigArgs
        {
            CaCertificate = "string",
            CaCertificateSet = false,
            ClientCertificate = "string",
            ClientCertificateSet = false,
            ClientKey = "string",
            ClientKeySet = false,
        },
    },
    OracleProfile = new Gcp.Datastream.Inputs.ConnectionProfileOracleProfileArgs
    {
        DatabaseService = "string",
        Hostname = "string",
        Username = "string",
        ConnectionAttributes = 
        {
            { "string", "string" },
        },
        Password = "string",
        Port = 0,
        SecretManagerStoredPassword = "string",
    },
    PostgresqlProfile = new Gcp.Datastream.Inputs.ConnectionProfilePostgresqlProfileArgs
    {
        Database = "string",
        Hostname = "string",
        Username = "string",
        Password = "string",
        Port = 0,
        SecretManagerStoredPassword = "string",
    },
    PrivateConnectivity = new Gcp.Datastream.Inputs.ConnectionProfilePrivateConnectivityArgs
    {
        PrivateConnection = "string",
    },
    Project = "string",
    SalesforceProfile = new Gcp.Datastream.Inputs.ConnectionProfileSalesforceProfileArgs
    {
        Domain = "string",
        Oauth2ClientCredentials = new Gcp.Datastream.Inputs.ConnectionProfileSalesforceProfileOauth2ClientCredentialsArgs
        {
            ClientId = "string",
            ClientSecret = "string",
            SecretManagerStoredClientSecret = "string",
        },
        UserCredentials = new Gcp.Datastream.Inputs.ConnectionProfileSalesforceProfileUserCredentialsArgs
        {
            Password = "string",
            SecretManagerStoredPassword = "string",
            SecretManagerStoredSecurityToken = "string",
            SecurityToken = "string",
            Username = "string",
        },
    },
    SqlServerProfile = new Gcp.Datastream.Inputs.ConnectionProfileSqlServerProfileArgs
    {
        Database = "string",
        Hostname = "string",
        Username = "string",
        Password = "string",
        Port = 0,
        SecretManagerStoredPassword = "string",
    },
});
Copy
example, err := datastream.NewConnectionProfile(ctx, "gcpConnectionProfileResource", &datastream.ConnectionProfileArgs{
	DisplayName:         pulumi.String("string"),
	ConnectionProfileId: pulumi.String("string"),
	Location:            pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	ForwardSshConnectivity: &datastream.ConnectionProfileForwardSshConnectivityArgs{
		Hostname:   pulumi.String("string"),
		Username:   pulumi.String("string"),
		Password:   pulumi.String("string"),
		Port:       pulumi.Int(0),
		PrivateKey: pulumi.String("string"),
	},
	GcsProfile: &datastream.ConnectionProfileGcsProfileArgs{
		Bucket:   pulumi.String("string"),
		RootPath: pulumi.String("string"),
	},
	BigqueryProfile:         &datastream.ConnectionProfileBigqueryProfileArgs{},
	CreateWithoutValidation: pulumi.Bool(false),
	MysqlProfile: &datastream.ConnectionProfileMysqlProfileArgs{
		Hostname:                    pulumi.String("string"),
		Username:                    pulumi.String("string"),
		Password:                    pulumi.String("string"),
		Port:                        pulumi.Int(0),
		SecretManagerStoredPassword: pulumi.String("string"),
		SslConfig: &datastream.ConnectionProfileMysqlProfileSslConfigArgs{
			CaCertificate:        pulumi.String("string"),
			CaCertificateSet:     pulumi.Bool(false),
			ClientCertificate:    pulumi.String("string"),
			ClientCertificateSet: pulumi.Bool(false),
			ClientKey:            pulumi.String("string"),
			ClientKeySet:         pulumi.Bool(false),
		},
	},
	OracleProfile: &datastream.ConnectionProfileOracleProfileArgs{
		DatabaseService: pulumi.String("string"),
		Hostname:        pulumi.String("string"),
		Username:        pulumi.String("string"),
		ConnectionAttributes: pulumi.StringMap{
			"string": pulumi.String("string"),
		},
		Password:                    pulumi.String("string"),
		Port:                        pulumi.Int(0),
		SecretManagerStoredPassword: pulumi.String("string"),
	},
	PostgresqlProfile: &datastream.ConnectionProfilePostgresqlProfileArgs{
		Database:                    pulumi.String("string"),
		Hostname:                    pulumi.String("string"),
		Username:                    pulumi.String("string"),
		Password:                    pulumi.String("string"),
		Port:                        pulumi.Int(0),
		SecretManagerStoredPassword: pulumi.String("string"),
	},
	PrivateConnectivity: &datastream.ConnectionProfilePrivateConnectivityArgs{
		PrivateConnection: pulumi.String("string"),
	},
	Project: pulumi.String("string"),
	SalesforceProfile: &datastream.ConnectionProfileSalesforceProfileArgs{
		Domain: pulumi.String("string"),
		Oauth2ClientCredentials: &datastream.ConnectionProfileSalesforceProfileOauth2ClientCredentialsArgs{
			ClientId:                        pulumi.String("string"),
			ClientSecret:                    pulumi.String("string"),
			SecretManagerStoredClientSecret: pulumi.String("string"),
		},
		UserCredentials: &datastream.ConnectionProfileSalesforceProfileUserCredentialsArgs{
			Password:                         pulumi.String("string"),
			SecretManagerStoredPassword:      pulumi.String("string"),
			SecretManagerStoredSecurityToken: pulumi.String("string"),
			SecurityToken:                    pulumi.String("string"),
			Username:                         pulumi.String("string"),
		},
	},
	SqlServerProfile: &datastream.ConnectionProfileSqlServerProfileArgs{
		Database:                    pulumi.String("string"),
		Hostname:                    pulumi.String("string"),
		Username:                    pulumi.String("string"),
		Password:                    pulumi.String("string"),
		Port:                        pulumi.Int(0),
		SecretManagerStoredPassword: pulumi.String("string"),
	},
})
Copy
var gcpConnectionProfileResource = new ConnectionProfile("gcpConnectionProfileResource", ConnectionProfileArgs.builder()
    .displayName("string")
    .connectionProfileId("string")
    .location("string")
    .labels(Map.of("string", "string"))
    .forwardSshConnectivity(ConnectionProfileForwardSshConnectivityArgs.builder()
        .hostname("string")
        .username("string")
        .password("string")
        .port(0)
        .privateKey("string")
        .build())
    .gcsProfile(ConnectionProfileGcsProfileArgs.builder()
        .bucket("string")
        .rootPath("string")
        .build())
    .bigqueryProfile()
    .createWithoutValidation(false)
    .mysqlProfile(ConnectionProfileMysqlProfileArgs.builder()
        .hostname("string")
        .username("string")
        .password("string")
        .port(0)
        .secretManagerStoredPassword("string")
        .sslConfig(ConnectionProfileMysqlProfileSslConfigArgs.builder()
            .caCertificate("string")
            .caCertificateSet(false)
            .clientCertificate("string")
            .clientCertificateSet(false)
            .clientKey("string")
            .clientKeySet(false)
            .build())
        .build())
    .oracleProfile(ConnectionProfileOracleProfileArgs.builder()
        .databaseService("string")
        .hostname("string")
        .username("string")
        .connectionAttributes(Map.of("string", "string"))
        .password("string")
        .port(0)
        .secretManagerStoredPassword("string")
        .build())
    .postgresqlProfile(ConnectionProfilePostgresqlProfileArgs.builder()
        .database("string")
        .hostname("string")
        .username("string")
        .password("string")
        .port(0)
        .secretManagerStoredPassword("string")
        .build())
    .privateConnectivity(ConnectionProfilePrivateConnectivityArgs.builder()
        .privateConnection("string")
        .build())
    .project("string")
    .salesforceProfile(ConnectionProfileSalesforceProfileArgs.builder()
        .domain("string")
        .oauth2ClientCredentials(ConnectionProfileSalesforceProfileOauth2ClientCredentialsArgs.builder()
            .clientId("string")
            .clientSecret("string")
            .secretManagerStoredClientSecret("string")
            .build())
        .userCredentials(ConnectionProfileSalesforceProfileUserCredentialsArgs.builder()
            .password("string")
            .secretManagerStoredPassword("string")
            .secretManagerStoredSecurityToken("string")
            .securityToken("string")
            .username("string")
            .build())
        .build())
    .sqlServerProfile(ConnectionProfileSqlServerProfileArgs.builder()
        .database("string")
        .hostname("string")
        .username("string")
        .password("string")
        .port(0)
        .secretManagerStoredPassword("string")
        .build())
    .build());
Copy
gcp_connection_profile_resource = gcp.datastream.ConnectionProfile("gcpConnectionProfileResource",
    display_name="string",
    connection_profile_id="string",
    location="string",
    labels={
        "string": "string",
    },
    forward_ssh_connectivity={
        "hostname": "string",
        "username": "string",
        "password": "string",
        "port": 0,
        "private_key": "string",
    },
    gcs_profile={
        "bucket": "string",
        "root_path": "string",
    },
    bigquery_profile={},
    create_without_validation=False,
    mysql_profile={
        "hostname": "string",
        "username": "string",
        "password": "string",
        "port": 0,
        "secret_manager_stored_password": "string",
        "ssl_config": {
            "ca_certificate": "string",
            "ca_certificate_set": False,
            "client_certificate": "string",
            "client_certificate_set": False,
            "client_key": "string",
            "client_key_set": False,
        },
    },
    oracle_profile={
        "database_service": "string",
        "hostname": "string",
        "username": "string",
        "connection_attributes": {
            "string": "string",
        },
        "password": "string",
        "port": 0,
        "secret_manager_stored_password": "string",
    },
    postgresql_profile={
        "database": "string",
        "hostname": "string",
        "username": "string",
        "password": "string",
        "port": 0,
        "secret_manager_stored_password": "string",
    },
    private_connectivity={
        "private_connection": "string",
    },
    project="string",
    salesforce_profile={
        "domain": "string",
        "oauth2_client_credentials": {
            "client_id": "string",
            "client_secret": "string",
            "secret_manager_stored_client_secret": "string",
        },
        "user_credentials": {
            "password": "string",
            "secret_manager_stored_password": "string",
            "secret_manager_stored_security_token": "string",
            "security_token": "string",
            "username": "string",
        },
    },
    sql_server_profile={
        "database": "string",
        "hostname": "string",
        "username": "string",
        "password": "string",
        "port": 0,
        "secret_manager_stored_password": "string",
    })
Copy
const gcpConnectionProfileResource = new gcp.datastream.ConnectionProfile("gcpConnectionProfileResource", {
    displayName: "string",
    connectionProfileId: "string",
    location: "string",
    labels: {
        string: "string",
    },
    forwardSshConnectivity: {
        hostname: "string",
        username: "string",
        password: "string",
        port: 0,
        privateKey: "string",
    },
    gcsProfile: {
        bucket: "string",
        rootPath: "string",
    },
    bigqueryProfile: {},
    createWithoutValidation: false,
    mysqlProfile: {
        hostname: "string",
        username: "string",
        password: "string",
        port: 0,
        secretManagerStoredPassword: "string",
        sslConfig: {
            caCertificate: "string",
            caCertificateSet: false,
            clientCertificate: "string",
            clientCertificateSet: false,
            clientKey: "string",
            clientKeySet: false,
        },
    },
    oracleProfile: {
        databaseService: "string",
        hostname: "string",
        username: "string",
        connectionAttributes: {
            string: "string",
        },
        password: "string",
        port: 0,
        secretManagerStoredPassword: "string",
    },
    postgresqlProfile: {
        database: "string",
        hostname: "string",
        username: "string",
        password: "string",
        port: 0,
        secretManagerStoredPassword: "string",
    },
    privateConnectivity: {
        privateConnection: "string",
    },
    project: "string",
    salesforceProfile: {
        domain: "string",
        oauth2ClientCredentials: {
            clientId: "string",
            clientSecret: "string",
            secretManagerStoredClientSecret: "string",
        },
        userCredentials: {
            password: "string",
            secretManagerStoredPassword: "string",
            secretManagerStoredSecurityToken: "string",
            securityToken: "string",
            username: "string",
        },
    },
    sqlServerProfile: {
        database: "string",
        hostname: "string",
        username: "string",
        password: "string",
        port: 0,
        secretManagerStoredPassword: "string",
    },
});
Copy
type: gcp:datastream:ConnectionProfile
properties:
    bigqueryProfile: {}
    connectionProfileId: string
    createWithoutValidation: false
    displayName: string
    forwardSshConnectivity:
        hostname: string
        password: string
        port: 0
        privateKey: string
        username: string
    gcsProfile:
        bucket: string
        rootPath: string
    labels:
        string: string
    location: string
    mysqlProfile:
        hostname: string
        password: string
        port: 0
        secretManagerStoredPassword: string
        sslConfig:
            caCertificate: string
            caCertificateSet: false
            clientCertificate: string
            clientCertificateSet: false
            clientKey: string
            clientKeySet: false
        username: string
    oracleProfile:
        connectionAttributes:
            string: string
        databaseService: string
        hostname: string
        password: string
        port: 0
        secretManagerStoredPassword: string
        username: string
    postgresqlProfile:
        database: string
        hostname: string
        password: string
        port: 0
        secretManagerStoredPassword: string
        username: string
    privateConnectivity:
        privateConnection: string
    project: string
    salesforceProfile:
        domain: string
        oauth2ClientCredentials:
            clientId: string
            clientSecret: string
            secretManagerStoredClientSecret: string
        userCredentials:
            password: string
            secretManagerStoredPassword: string
            secretManagerStoredSecurityToken: string
            securityToken: string
            username: string
    sqlServerProfile:
        database: string
        hostname: string
        password: string
        port: 0
        secretManagerStoredPassword: string
        username: string
Copy

ConnectionProfile 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 ConnectionProfile resource accepts the following input properties:

ConnectionProfileId
This property is required.
Changes to this property will trigger replacement.
string
The connection profile identifier.
DisplayName This property is required. string
Display name.
Location
This property is required.
Changes to this property will trigger replacement.
string
The name of the location this connection profile is located in.


BigqueryProfile ConnectionProfileBigqueryProfile
BigQuery warehouse profile.
CreateWithoutValidation Changes to this property will trigger replacement. bool
Create the connection profile without validating it.
ForwardSshConnectivity ConnectionProfileForwardSshConnectivity
Forward SSH tunnel connectivity. Structure is documented below.
GcsProfile ConnectionProfileGcsProfile
Cloud Storage bucket profile. Structure is documented below.
Labels Dictionary<string, string>
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
MysqlProfile ConnectionProfileMysqlProfile
MySQL database profile. Structure is documented below.
OracleProfile ConnectionProfileOracleProfile
Oracle database profile. Structure is documented below.
PostgresqlProfile ConnectionProfilePostgresqlProfile
PostgreSQL database profile. Structure is documented below.
PrivateConnectivity ConnectionProfilePrivateConnectivity
Private connectivity. Structure is documented below.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SalesforceProfile ConnectionProfileSalesforceProfile
Salesforce profile. Structure is documented below.
SqlServerProfile ConnectionProfileSqlServerProfile
SQL Server database profile. Structure is documented below.
ConnectionProfileId
This property is required.
Changes to this property will trigger replacement.
string
The connection profile identifier.
DisplayName This property is required. string
Display name.
Location
This property is required.
Changes to this property will trigger replacement.
string
The name of the location this connection profile is located in.


BigqueryProfile ConnectionProfileBigqueryProfileArgs
BigQuery warehouse profile.
CreateWithoutValidation Changes to this property will trigger replacement. bool
Create the connection profile without validating it.
ForwardSshConnectivity ConnectionProfileForwardSshConnectivityArgs
Forward SSH tunnel connectivity. Structure is documented below.
GcsProfile ConnectionProfileGcsProfileArgs
Cloud Storage bucket profile. Structure is documented below.
Labels map[string]string
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
MysqlProfile ConnectionProfileMysqlProfileArgs
MySQL database profile. Structure is documented below.
OracleProfile ConnectionProfileOracleProfileArgs
Oracle database profile. Structure is documented below.
PostgresqlProfile ConnectionProfilePostgresqlProfileArgs
PostgreSQL database profile. Structure is documented below.
PrivateConnectivity ConnectionProfilePrivateConnectivityArgs
Private connectivity. Structure is documented below.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
SalesforceProfile ConnectionProfileSalesforceProfileArgs
Salesforce profile. Structure is documented below.
SqlServerProfile ConnectionProfileSqlServerProfileArgs
SQL Server database profile. Structure is documented below.
connectionProfileId
This property is required.
Changes to this property will trigger replacement.
String
The connection profile identifier.
displayName This property is required. String
Display name.
location
This property is required.
Changes to this property will trigger replacement.
String
The name of the location this connection profile is located in.


bigqueryProfile ConnectionProfileBigqueryProfile
BigQuery warehouse profile.
createWithoutValidation Changes to this property will trigger replacement. Boolean
Create the connection profile without validating it.
forwardSshConnectivity ConnectionProfileForwardSshConnectivity
Forward SSH tunnel connectivity. Structure is documented below.
gcsProfile ConnectionProfileGcsProfile
Cloud Storage bucket profile. Structure is documented below.
labels Map<String,String>
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
mysqlProfile ConnectionProfileMysqlProfile
MySQL database profile. Structure is documented below.
oracleProfile ConnectionProfileOracleProfile
Oracle database profile. Structure is documented below.
postgresqlProfile ConnectionProfilePostgresqlProfile
PostgreSQL database profile. Structure is documented below.
privateConnectivity ConnectionProfilePrivateConnectivity
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
salesforceProfile ConnectionProfileSalesforceProfile
Salesforce profile. Structure is documented below.
sqlServerProfile ConnectionProfileSqlServerProfile
SQL Server database profile. Structure is documented below.
connectionProfileId
This property is required.
Changes to this property will trigger replacement.
string
The connection profile identifier.
displayName This property is required. string
Display name.
location
This property is required.
Changes to this property will trigger replacement.
string
The name of the location this connection profile is located in.


bigqueryProfile ConnectionProfileBigqueryProfile
BigQuery warehouse profile.
createWithoutValidation Changes to this property will trigger replacement. boolean
Create the connection profile without validating it.
forwardSshConnectivity ConnectionProfileForwardSshConnectivity
Forward SSH tunnel connectivity. Structure is documented below.
gcsProfile ConnectionProfileGcsProfile
Cloud Storage bucket profile. Structure is documented below.
labels {[key: string]: string}
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
mysqlProfile ConnectionProfileMysqlProfile
MySQL database profile. Structure is documented below.
oracleProfile ConnectionProfileOracleProfile
Oracle database profile. Structure is documented below.
postgresqlProfile ConnectionProfilePostgresqlProfile
PostgreSQL database profile. Structure is documented below.
privateConnectivity ConnectionProfilePrivateConnectivity
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
salesforceProfile ConnectionProfileSalesforceProfile
Salesforce profile. Structure is documented below.
sqlServerProfile ConnectionProfileSqlServerProfile
SQL Server database profile. Structure is documented below.
connection_profile_id
This property is required.
Changes to this property will trigger replacement.
str
The connection profile identifier.
display_name This property is required. str
Display name.
location
This property is required.
Changes to this property will trigger replacement.
str
The name of the location this connection profile is located in.


bigquery_profile ConnectionProfileBigqueryProfileArgs
BigQuery warehouse profile.
create_without_validation Changes to this property will trigger replacement. bool
Create the connection profile without validating it.
forward_ssh_connectivity ConnectionProfileForwardSshConnectivityArgs
Forward SSH tunnel connectivity. Structure is documented below.
gcs_profile ConnectionProfileGcsProfileArgs
Cloud Storage bucket profile. Structure is documented below.
labels Mapping[str, str]
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
mysql_profile ConnectionProfileMysqlProfileArgs
MySQL database profile. Structure is documented below.
oracle_profile ConnectionProfileOracleProfileArgs
Oracle database profile. Structure is documented below.
postgresql_profile ConnectionProfilePostgresqlProfileArgs
PostgreSQL database profile. Structure is documented below.
private_connectivity ConnectionProfilePrivateConnectivityArgs
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
salesforce_profile ConnectionProfileSalesforceProfileArgs
Salesforce profile. Structure is documented below.
sql_server_profile ConnectionProfileSqlServerProfileArgs
SQL Server database profile. Structure is documented below.
connectionProfileId
This property is required.
Changes to this property will trigger replacement.
String
The connection profile identifier.
displayName This property is required. String
Display name.
location
This property is required.
Changes to this property will trigger replacement.
String
The name of the location this connection profile is located in.


bigqueryProfile Property Map
BigQuery warehouse profile.
createWithoutValidation Changes to this property will trigger replacement. Boolean
Create the connection profile without validating it.
forwardSshConnectivity Property Map
Forward SSH tunnel connectivity. Structure is documented below.
gcsProfile Property Map
Cloud Storage bucket profile. Structure is documented below.
labels Map<String>
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
mysqlProfile Property Map
MySQL database profile. Structure is documented below.
oracleProfile Property Map
Oracle database profile. Structure is documented below.
postgresqlProfile Property Map
PostgreSQL database profile. Structure is documented below.
privateConnectivity Property Map
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
salesforceProfile Property Map
Salesforce profile. Structure is documented below.
sqlServerProfile Property Map
SQL Server database profile. Structure is documented below.

Outputs

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

EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource's name.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource's name.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource's name.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id string
The provider-assigned unique ID for this managed resource.
name string
The resource's name.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id str
The provider-assigned unique ID for this managed resource.
name str
The resource's name.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource's name.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.

Look up Existing ConnectionProfile Resource

Get an existing ConnectionProfile 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?: ConnectionProfileState, opts?: CustomResourceOptions): ConnectionProfile
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bigquery_profile: Optional[ConnectionProfileBigqueryProfileArgs] = None,
        connection_profile_id: Optional[str] = None,
        create_without_validation: Optional[bool] = None,
        display_name: Optional[str] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        forward_ssh_connectivity: Optional[ConnectionProfileForwardSshConnectivityArgs] = None,
        gcs_profile: Optional[ConnectionProfileGcsProfileArgs] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        mysql_profile: Optional[ConnectionProfileMysqlProfileArgs] = None,
        name: Optional[str] = None,
        oracle_profile: Optional[ConnectionProfileOracleProfileArgs] = None,
        postgresql_profile: Optional[ConnectionProfilePostgresqlProfileArgs] = None,
        private_connectivity: Optional[ConnectionProfilePrivateConnectivityArgs] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        salesforce_profile: Optional[ConnectionProfileSalesforceProfileArgs] = None,
        sql_server_profile: Optional[ConnectionProfileSqlServerProfileArgs] = None) -> ConnectionProfile
func GetConnectionProfile(ctx *Context, name string, id IDInput, state *ConnectionProfileState, opts ...ResourceOption) (*ConnectionProfile, error)
public static ConnectionProfile Get(string name, Input<string> id, ConnectionProfileState? state, CustomResourceOptions? opts = null)
public static ConnectionProfile get(String name, Output<String> id, ConnectionProfileState state, CustomResourceOptions options)
resources:  _:    type: gcp:datastream:ConnectionProfile    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
BigqueryProfile ConnectionProfileBigqueryProfile
BigQuery warehouse profile.
ConnectionProfileId Changes to this property will trigger replacement. string
The connection profile identifier.
CreateWithoutValidation Changes to this property will trigger replacement. bool
Create the connection profile without validating it.
DisplayName string
Display name.
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
ForwardSshConnectivity ConnectionProfileForwardSshConnectivity
Forward SSH tunnel connectivity. Structure is documented below.
GcsProfile ConnectionProfileGcsProfile
Cloud Storage bucket profile. Structure is documented below.
Labels Dictionary<string, string>
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
Location Changes to this property will trigger replacement. string
The name of the location this connection profile is located in.


MysqlProfile ConnectionProfileMysqlProfile
MySQL database profile. Structure is documented below.
Name string
The resource's name.
OracleProfile ConnectionProfileOracleProfile
Oracle database profile. Structure is documented below.
PostgresqlProfile ConnectionProfilePostgresqlProfile
PostgreSQL database profile. Structure is documented below.
PrivateConnectivity ConnectionProfilePrivateConnectivity
Private connectivity. Structure is documented below.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
SalesforceProfile ConnectionProfileSalesforceProfile
Salesforce profile. Structure is documented below.
SqlServerProfile ConnectionProfileSqlServerProfile
SQL Server database profile. Structure is documented below.
BigqueryProfile ConnectionProfileBigqueryProfileArgs
BigQuery warehouse profile.
ConnectionProfileId Changes to this property will trigger replacement. string
The connection profile identifier.
CreateWithoutValidation Changes to this property will trigger replacement. bool
Create the connection profile without validating it.
DisplayName string
Display name.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
ForwardSshConnectivity ConnectionProfileForwardSshConnectivityArgs
Forward SSH tunnel connectivity. Structure is documented below.
GcsProfile ConnectionProfileGcsProfileArgs
Cloud Storage bucket profile. Structure is documented below.
Labels map[string]string
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
Location Changes to this property will trigger replacement. string
The name of the location this connection profile is located in.


MysqlProfile ConnectionProfileMysqlProfileArgs
MySQL database profile. Structure is documented below.
Name string
The resource's name.
OracleProfile ConnectionProfileOracleProfileArgs
Oracle database profile. Structure is documented below.
PostgresqlProfile ConnectionProfilePostgresqlProfileArgs
PostgreSQL database profile. Structure is documented below.
PrivateConnectivity ConnectionProfilePrivateConnectivityArgs
Private connectivity. Structure is documented below.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
SalesforceProfile ConnectionProfileSalesforceProfileArgs
Salesforce profile. Structure is documented below.
SqlServerProfile ConnectionProfileSqlServerProfileArgs
SQL Server database profile. Structure is documented below.
bigqueryProfile ConnectionProfileBigqueryProfile
BigQuery warehouse profile.
connectionProfileId Changes to this property will trigger replacement. String
The connection profile identifier.
createWithoutValidation Changes to this property will trigger replacement. Boolean
Create the connection profile without validating it.
displayName String
Display name.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
forwardSshConnectivity ConnectionProfileForwardSshConnectivity
Forward SSH tunnel connectivity. Structure is documented below.
gcsProfile ConnectionProfileGcsProfile
Cloud Storage bucket profile. Structure is documented below.
labels Map<String,String>
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. String
The name of the location this connection profile is located in.


mysqlProfile ConnectionProfileMysqlProfile
MySQL database profile. Structure is documented below.
name String
The resource's name.
oracleProfile ConnectionProfileOracleProfile
Oracle database profile. Structure is documented below.
postgresqlProfile ConnectionProfilePostgresqlProfile
PostgreSQL database profile. Structure is documented below.
privateConnectivity ConnectionProfilePrivateConnectivity
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
salesforceProfile ConnectionProfileSalesforceProfile
Salesforce profile. Structure is documented below.
sqlServerProfile ConnectionProfileSqlServerProfile
SQL Server database profile. Structure is documented below.
bigqueryProfile ConnectionProfileBigqueryProfile
BigQuery warehouse profile.
connectionProfileId Changes to this property will trigger replacement. string
The connection profile identifier.
createWithoutValidation Changes to this property will trigger replacement. boolean
Create the connection profile without validating it.
displayName string
Display name.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
forwardSshConnectivity ConnectionProfileForwardSshConnectivity
Forward SSH tunnel connectivity. Structure is documented below.
gcsProfile ConnectionProfileGcsProfile
Cloud Storage bucket profile. Structure is documented below.
labels {[key: string]: string}
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. string
The name of the location this connection profile is located in.


mysqlProfile ConnectionProfileMysqlProfile
MySQL database profile. Structure is documented below.
name string
The resource's name.
oracleProfile ConnectionProfileOracleProfile
Oracle database profile. Structure is documented below.
postgresqlProfile ConnectionProfilePostgresqlProfile
PostgreSQL database profile. Structure is documented below.
privateConnectivity ConnectionProfilePrivateConnectivity
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
salesforceProfile ConnectionProfileSalesforceProfile
Salesforce profile. Structure is documented below.
sqlServerProfile ConnectionProfileSqlServerProfile
SQL Server database profile. Structure is documented below.
bigquery_profile ConnectionProfileBigqueryProfileArgs
BigQuery warehouse profile.
connection_profile_id Changes to this property will trigger replacement. str
The connection profile identifier.
create_without_validation Changes to this property will trigger replacement. bool
Create the connection profile without validating it.
display_name str
Display name.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
forward_ssh_connectivity ConnectionProfileForwardSshConnectivityArgs
Forward SSH tunnel connectivity. Structure is documented below.
gcs_profile ConnectionProfileGcsProfileArgs
Cloud Storage bucket profile. Structure is documented below.
labels Mapping[str, str]
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. str
The name of the location this connection profile is located in.


mysql_profile ConnectionProfileMysqlProfileArgs
MySQL database profile. Structure is documented below.
name str
The resource's name.
oracle_profile ConnectionProfileOracleProfileArgs
Oracle database profile. Structure is documented below.
postgresql_profile ConnectionProfilePostgresqlProfileArgs
PostgreSQL database profile. Structure is documented below.
private_connectivity ConnectionProfilePrivateConnectivityArgs
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
salesforce_profile ConnectionProfileSalesforceProfileArgs
Salesforce profile. Structure is documented below.
sql_server_profile ConnectionProfileSqlServerProfileArgs
SQL Server database profile. Structure is documented below.
bigqueryProfile Property Map
BigQuery warehouse profile.
connectionProfileId Changes to this property will trigger replacement. String
The connection profile identifier.
createWithoutValidation Changes to this property will trigger replacement. Boolean
Create the connection profile without validating it.
displayName String
Display name.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
forwardSshConnectivity Property Map
Forward SSH tunnel connectivity. Structure is documented below.
gcsProfile Property Map
Cloud Storage bucket profile. Structure is documented below.
labels Map<String>
Labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.
location Changes to this property will trigger replacement. String
The name of the location this connection profile is located in.


mysqlProfile Property Map
MySQL database profile. Structure is documented below.
name String
The resource's name.
oracleProfile Property Map
Oracle database profile. Structure is documented below.
postgresqlProfile Property Map
PostgreSQL database profile. Structure is documented below.
privateConnectivity Property Map
Private connectivity. Structure is documented below.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
salesforceProfile Property Map
Salesforce profile. Structure is documented below.
sqlServerProfile Property Map
SQL Server database profile. Structure is documented below.

Supporting Types

ConnectionProfileForwardSshConnectivity
, ConnectionProfileForwardSshConnectivityArgs

Hostname This property is required. string
Hostname for the SSH tunnel.
Username This property is required. string
Username for the SSH tunnel.
Password Changes to this property will trigger replacement. string
SSH password. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the SSH tunnel.
PrivateKey string
SSH private key. Note: This property is sensitive and will not be displayed in the plan.
Hostname This property is required. string
Hostname for the SSH tunnel.
Username This property is required. string
Username for the SSH tunnel.
Password Changes to this property will trigger replacement. string
SSH password. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the SSH tunnel.
PrivateKey string
SSH private key. Note: This property is sensitive and will not be displayed in the plan.
hostname This property is required. String
Hostname for the SSH tunnel.
username This property is required. String
Username for the SSH tunnel.
password Changes to this property will trigger replacement. String
SSH password. Note: This property is sensitive and will not be displayed in the plan.
port Integer
Port for the SSH tunnel.
privateKey String
SSH private key. Note: This property is sensitive and will not be displayed in the plan.
hostname This property is required. string
Hostname for the SSH tunnel.
username This property is required. string
Username for the SSH tunnel.
password Changes to this property will trigger replacement. string
SSH password. Note: This property is sensitive and will not be displayed in the plan.
port number
Port for the SSH tunnel.
privateKey string
SSH private key. Note: This property is sensitive and will not be displayed in the plan.
hostname This property is required. str
Hostname for the SSH tunnel.
username This property is required. str
Username for the SSH tunnel.
password Changes to this property will trigger replacement. str
SSH password. Note: This property is sensitive and will not be displayed in the plan.
port int
Port for the SSH tunnel.
private_key str
SSH private key. Note: This property is sensitive and will not be displayed in the plan.
hostname This property is required. String
Hostname for the SSH tunnel.
username This property is required. String
Username for the SSH tunnel.
password Changes to this property will trigger replacement. String
SSH password. Note: This property is sensitive and will not be displayed in the plan.
port Number
Port for the SSH tunnel.
privateKey String
SSH private key. Note: This property is sensitive and will not be displayed in the plan.

ConnectionProfileGcsProfile
, ConnectionProfileGcsProfileArgs

Bucket This property is required. string
The Cloud Storage bucket name.
RootPath string
The root path inside the Cloud Storage bucket.
Bucket This property is required. string
The Cloud Storage bucket name.
RootPath string
The root path inside the Cloud Storage bucket.
bucket This property is required. String
The Cloud Storage bucket name.
rootPath String
The root path inside the Cloud Storage bucket.
bucket This property is required. string
The Cloud Storage bucket name.
rootPath string
The root path inside the Cloud Storage bucket.
bucket This property is required. str
The Cloud Storage bucket name.
root_path str
The root path inside the Cloud Storage bucket.
bucket This property is required. String
The Cloud Storage bucket name.
rootPath String
The root path inside the Cloud Storage bucket.

ConnectionProfileMysqlProfile
, ConnectionProfileMysqlProfileArgs

Hostname This property is required. string
Hostname for the MySQL connection.
Username This property is required. string
Username for the MySQL connection.
Password string
Password for the MySQL connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the MySQL connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
SslConfig ConnectionProfileMysqlProfileSslConfig
SSL configuration for the MySQL connection. Structure is documented below.
Hostname This property is required. string
Hostname for the MySQL connection.
Username This property is required. string
Username for the MySQL connection.
Password string
Password for the MySQL connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the MySQL connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
SslConfig ConnectionProfileMysqlProfileSslConfig
SSL configuration for the MySQL connection. Structure is documented below.
hostname This property is required. String
Hostname for the MySQL connection.
username This property is required. String
Username for the MySQL connection.
password String
Password for the MySQL connection. Note: This property is sensitive and will not be displayed in the plan.
port Integer
Port for the MySQL connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.
sslConfig ConnectionProfileMysqlProfileSslConfig
SSL configuration for the MySQL connection. Structure is documented below.
hostname This property is required. string
Hostname for the MySQL connection.
username This property is required. string
Username for the MySQL connection.
password string
Password for the MySQL connection. Note: This property is sensitive and will not be displayed in the plan.
port number
Port for the MySQL connection.
secretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
sslConfig ConnectionProfileMysqlProfileSslConfig
SSL configuration for the MySQL connection. Structure is documented below.
hostname This property is required. str
Hostname for the MySQL connection.
username This property is required. str
Username for the MySQL connection.
password str
Password for the MySQL connection. Note: This property is sensitive and will not be displayed in the plan.
port int
Port for the MySQL connection.
secret_manager_stored_password str
A reference to a Secret Manager resource name storing the user's password.
ssl_config ConnectionProfileMysqlProfileSslConfig
SSL configuration for the MySQL connection. Structure is documented below.
hostname This property is required. String
Hostname for the MySQL connection.
username This property is required. String
Username for the MySQL connection.
password String
Password for the MySQL connection. Note: This property is sensitive and will not be displayed in the plan.
port Number
Port for the MySQL connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.
sslConfig Property Map
SSL configuration for the MySQL connection. Structure is documented below.

ConnectionProfileMysqlProfileSslConfig
, ConnectionProfileMysqlProfileSslConfigArgs

CaCertificate Changes to this property will trigger replacement. string
PEM-encoded certificate of the CA that signed the source database server's certificate. Note: This property is sensitive and will not be displayed in the plan.
CaCertificateSet bool
(Output) Indicates whether the clientKey field is set.
ClientCertificate Changes to this property will trigger replacement. string
PEM-encoded certificate that will be used by the replica to authenticate against the source database server. If this field is used then the 'clientKey' and the 'caCertificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
ClientCertificateSet bool
(Output) Indicates whether the clientCertificate field is set.
ClientKey Changes to this property will trigger replacement. string
PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' and the 'ca_certificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
ClientKeySet bool
(Output) Indicates whether the clientKey field is set.
CaCertificate Changes to this property will trigger replacement. string
PEM-encoded certificate of the CA that signed the source database server's certificate. Note: This property is sensitive and will not be displayed in the plan.
CaCertificateSet bool
(Output) Indicates whether the clientKey field is set.
ClientCertificate Changes to this property will trigger replacement. string
PEM-encoded certificate that will be used by the replica to authenticate against the source database server. If this field is used then the 'clientKey' and the 'caCertificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
ClientCertificateSet bool
(Output) Indicates whether the clientCertificate field is set.
ClientKey Changes to this property will trigger replacement. string
PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' and the 'ca_certificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
ClientKeySet bool
(Output) Indicates whether the clientKey field is set.
caCertificate Changes to this property will trigger replacement. String
PEM-encoded certificate of the CA that signed the source database server's certificate. Note: This property is sensitive and will not be displayed in the plan.
caCertificateSet Boolean
(Output) Indicates whether the clientKey field is set.
clientCertificate Changes to this property will trigger replacement. String
PEM-encoded certificate that will be used by the replica to authenticate against the source database server. If this field is used then the 'clientKey' and the 'caCertificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
clientCertificateSet Boolean
(Output) Indicates whether the clientCertificate field is set.
clientKey Changes to this property will trigger replacement. String
PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' and the 'ca_certificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
clientKeySet Boolean
(Output) Indicates whether the clientKey field is set.
caCertificate Changes to this property will trigger replacement. string
PEM-encoded certificate of the CA that signed the source database server's certificate. Note: This property is sensitive and will not be displayed in the plan.
caCertificateSet boolean
(Output) Indicates whether the clientKey field is set.
clientCertificate Changes to this property will trigger replacement. string
PEM-encoded certificate that will be used by the replica to authenticate against the source database server. If this field is used then the 'clientKey' and the 'caCertificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
clientCertificateSet boolean
(Output) Indicates whether the clientCertificate field is set.
clientKey Changes to this property will trigger replacement. string
PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' and the 'ca_certificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
clientKeySet boolean
(Output) Indicates whether the clientKey field is set.
ca_certificate Changes to this property will trigger replacement. str
PEM-encoded certificate of the CA that signed the source database server's certificate. Note: This property is sensitive and will not be displayed in the plan.
ca_certificate_set bool
(Output) Indicates whether the clientKey field is set.
client_certificate Changes to this property will trigger replacement. str
PEM-encoded certificate that will be used by the replica to authenticate against the source database server. If this field is used then the 'clientKey' and the 'caCertificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
client_certificate_set bool
(Output) Indicates whether the clientCertificate field is set.
client_key Changes to this property will trigger replacement. str
PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' and the 'ca_certificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
client_key_set bool
(Output) Indicates whether the clientKey field is set.
caCertificate Changes to this property will trigger replacement. String
PEM-encoded certificate of the CA that signed the source database server's certificate. Note: This property is sensitive and will not be displayed in the plan.
caCertificateSet Boolean
(Output) Indicates whether the clientKey field is set.
clientCertificate Changes to this property will trigger replacement. String
PEM-encoded certificate that will be used by the replica to authenticate against the source database server. If this field is used then the 'clientKey' and the 'caCertificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
clientCertificateSet Boolean
(Output) Indicates whether the clientCertificate field is set.
clientKey Changes to this property will trigger replacement. String
PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' and the 'ca_certificate' fields are mandatory. Note: This property is sensitive and will not be displayed in the plan.
clientKeySet Boolean
(Output) Indicates whether the clientKey field is set.

ConnectionProfileOracleProfile
, ConnectionProfileOracleProfileArgs

DatabaseService This property is required. string
Database for the Oracle connection.
Hostname This property is required. string
Hostname for the Oracle connection.
Username This property is required. string
Username for the Oracle connection.
ConnectionAttributes Dictionary<string, string>
Connection string attributes
Password string
Password for the Oracle connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the Oracle connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
DatabaseService This property is required. string
Database for the Oracle connection.
Hostname This property is required. string
Hostname for the Oracle connection.
Username This property is required. string
Username for the Oracle connection.
ConnectionAttributes map[string]string
Connection string attributes
Password string
Password for the Oracle connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the Oracle connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
databaseService This property is required. String
Database for the Oracle connection.
hostname This property is required. String
Hostname for the Oracle connection.
username This property is required. String
Username for the Oracle connection.
connectionAttributes Map<String,String>
Connection string attributes
password String
Password for the Oracle connection. Note: This property is sensitive and will not be displayed in the plan.
port Integer
Port for the Oracle connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.
databaseService This property is required. string
Database for the Oracle connection.
hostname This property is required. string
Hostname for the Oracle connection.
username This property is required. string
Username for the Oracle connection.
connectionAttributes {[key: string]: string}
Connection string attributes
password string
Password for the Oracle connection. Note: This property is sensitive and will not be displayed in the plan.
port number
Port for the Oracle connection.
secretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
database_service This property is required. str
Database for the Oracle connection.
hostname This property is required. str
Hostname for the Oracle connection.
username This property is required. str
Username for the Oracle connection.
connection_attributes Mapping[str, str]
Connection string attributes
password str
Password for the Oracle connection. Note: This property is sensitive and will not be displayed in the plan.
port int
Port for the Oracle connection.
secret_manager_stored_password str
A reference to a Secret Manager resource name storing the user's password.
databaseService This property is required. String
Database for the Oracle connection.
hostname This property is required. String
Hostname for the Oracle connection.
username This property is required. String
Username for the Oracle connection.
connectionAttributes Map<String>
Connection string attributes
password String
Password for the Oracle connection. Note: This property is sensitive and will not be displayed in the plan.
port Number
Port for the Oracle connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.

ConnectionProfilePostgresqlProfile
, ConnectionProfilePostgresqlProfileArgs

Database This property is required. string
Database for the PostgreSQL connection.
Hostname This property is required. string
Hostname for the PostgreSQL connection.
Username This property is required. string
Username for the PostgreSQL connection.
Password string
Password for the PostgreSQL connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the PostgreSQL connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
Database This property is required. string
Database for the PostgreSQL connection.
Hostname This property is required. string
Hostname for the PostgreSQL connection.
Username This property is required. string
Username for the PostgreSQL connection.
Password string
Password for the PostgreSQL connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the PostgreSQL connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
database This property is required. String
Database for the PostgreSQL connection.
hostname This property is required. String
Hostname for the PostgreSQL connection.
username This property is required. String
Username for the PostgreSQL connection.
password String
Password for the PostgreSQL connection. Note: This property is sensitive and will not be displayed in the plan.
port Integer
Port for the PostgreSQL connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.
database This property is required. string
Database for the PostgreSQL connection.
hostname This property is required. string
Hostname for the PostgreSQL connection.
username This property is required. string
Username for the PostgreSQL connection.
password string
Password for the PostgreSQL connection. Note: This property is sensitive and will not be displayed in the plan.
port number
Port for the PostgreSQL connection.
secretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
database This property is required. str
Database for the PostgreSQL connection.
hostname This property is required. str
Hostname for the PostgreSQL connection.
username This property is required. str
Username for the PostgreSQL connection.
password str
Password for the PostgreSQL connection. Note: This property is sensitive and will not be displayed in the plan.
port int
Port for the PostgreSQL connection.
secret_manager_stored_password str
A reference to a Secret Manager resource name storing the user's password.
database This property is required. String
Database for the PostgreSQL connection.
hostname This property is required. String
Hostname for the PostgreSQL connection.
username This property is required. String
Username for the PostgreSQL connection.
password String
Password for the PostgreSQL connection. Note: This property is sensitive and will not be displayed in the plan.
port Number
Port for the PostgreSQL connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.

ConnectionProfilePrivateConnectivity
, ConnectionProfilePrivateConnectivityArgs

PrivateConnection This property is required. string
A reference to a private connection resource. Format: projects/{project}/locations/{location}/privateConnections/{name}
PrivateConnection This property is required. string
A reference to a private connection resource. Format: projects/{project}/locations/{location}/privateConnections/{name}
privateConnection This property is required. String
A reference to a private connection resource. Format: projects/{project}/locations/{location}/privateConnections/{name}
privateConnection This property is required. string
A reference to a private connection resource. Format: projects/{project}/locations/{location}/privateConnections/{name}
private_connection This property is required. str
A reference to a private connection resource. Format: projects/{project}/locations/{location}/privateConnections/{name}
privateConnection This property is required. String
A reference to a private connection resource. Format: projects/{project}/locations/{location}/privateConnections/{name}

ConnectionProfileSalesforceProfile
, ConnectionProfileSalesforceProfileArgs

Domain This property is required. string
Domain for the Salesforce Org.
Oauth2ClientCredentials ConnectionProfileSalesforceProfileOauth2ClientCredentials
OAuth credentials to use for Salesforce authentication. Structure is documented below.
UserCredentials ConnectionProfileSalesforceProfileUserCredentials
User credentials to use for Salesforce authentication. Structure is documented below.
Domain This property is required. string
Domain for the Salesforce Org.
Oauth2ClientCredentials ConnectionProfileSalesforceProfileOauth2ClientCredentials
OAuth credentials to use for Salesforce authentication. Structure is documented below.
UserCredentials ConnectionProfileSalesforceProfileUserCredentials
User credentials to use for Salesforce authentication. Structure is documented below.
domain This property is required. String
Domain for the Salesforce Org.
oauth2ClientCredentials ConnectionProfileSalesforceProfileOauth2ClientCredentials
OAuth credentials to use for Salesforce authentication. Structure is documented below.
userCredentials ConnectionProfileSalesforceProfileUserCredentials
User credentials to use for Salesforce authentication. Structure is documented below.
domain This property is required. string
Domain for the Salesforce Org.
oauth2ClientCredentials ConnectionProfileSalesforceProfileOauth2ClientCredentials
OAuth credentials to use for Salesforce authentication. Structure is documented below.
userCredentials ConnectionProfileSalesforceProfileUserCredentials
User credentials to use for Salesforce authentication. Structure is documented below.
domain This property is required. str
Domain for the Salesforce Org.
oauth2_client_credentials ConnectionProfileSalesforceProfileOauth2ClientCredentials
OAuth credentials to use for Salesforce authentication. Structure is documented below.
user_credentials ConnectionProfileSalesforceProfileUserCredentials
User credentials to use for Salesforce authentication. Structure is documented below.
domain This property is required. String
Domain for the Salesforce Org.
oauth2ClientCredentials Property Map
OAuth credentials to use for Salesforce authentication. Structure is documented below.
userCredentials Property Map
User credentials to use for Salesforce authentication. Structure is documented below.

ConnectionProfileSalesforceProfileOauth2ClientCredentials
, ConnectionProfileSalesforceProfileOauth2ClientCredentialsArgs

ClientId string
Client ID to use for authentication.
ClientSecret string
Client secret to use for authentication.
SecretManagerStoredClientSecret string
A reference to a Secret Manager resource name storing the client secret.
ClientId string
Client ID to use for authentication.
ClientSecret string
Client secret to use for authentication.
SecretManagerStoredClientSecret string
A reference to a Secret Manager resource name storing the client secret.
clientId String
Client ID to use for authentication.
clientSecret String
Client secret to use for authentication.
secretManagerStoredClientSecret String
A reference to a Secret Manager resource name storing the client secret.
clientId string
Client ID to use for authentication.
clientSecret string
Client secret to use for authentication.
secretManagerStoredClientSecret string
A reference to a Secret Manager resource name storing the client secret.
client_id str
Client ID to use for authentication.
client_secret str
Client secret to use for authentication.
secret_manager_stored_client_secret str
A reference to a Secret Manager resource name storing the client secret.
clientId String
Client ID to use for authentication.
clientSecret String
Client secret to use for authentication.
secretManagerStoredClientSecret String
A reference to a Secret Manager resource name storing the client secret.

ConnectionProfileSalesforceProfileUserCredentials
, ConnectionProfileSalesforceProfileUserCredentialsArgs

Password string
Password of the user.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
SecretManagerStoredSecurityToken string

A reference to a Secret Manager resource name storing the user's security token.

The oauth2_client_credentials block supports:

SecurityToken string
Security token of the user.
Username string
Username to use for authentication.
Password string
Password of the user.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
SecretManagerStoredSecurityToken string

A reference to a Secret Manager resource name storing the user's security token.

The oauth2_client_credentials block supports:

SecurityToken string
Security token of the user.
Username string
Username to use for authentication.
password String
Password of the user.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.
secretManagerStoredSecurityToken String

A reference to a Secret Manager resource name storing the user's security token.

The oauth2_client_credentials block supports:

securityToken String
Security token of the user.
username String
Username to use for authentication.
password string
Password of the user.
secretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
secretManagerStoredSecurityToken string

A reference to a Secret Manager resource name storing the user's security token.

The oauth2_client_credentials block supports:

securityToken string
Security token of the user.
username string
Username to use for authentication.
password str
Password of the user.
secret_manager_stored_password str
A reference to a Secret Manager resource name storing the user's password.
secret_manager_stored_security_token str

A reference to a Secret Manager resource name storing the user's security token.

The oauth2_client_credentials block supports:

security_token str
Security token of the user.
username str
Username to use for authentication.
password String
Password of the user.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.
secretManagerStoredSecurityToken String

A reference to a Secret Manager resource name storing the user's security token.

The oauth2_client_credentials block supports:

securityToken String
Security token of the user.
username String
Username to use for authentication.

ConnectionProfileSqlServerProfile
, ConnectionProfileSqlServerProfileArgs

Database This property is required. string
Database for the SQL Server connection.
Hostname This property is required. string
Hostname for the SQL Server connection.
Username This property is required. string
Username for the SQL Server connection.
Password string
Password for the SQL Server connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the SQL Server connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
Database This property is required. string
Database for the SQL Server connection.
Hostname This property is required. string
Hostname for the SQL Server connection.
Username This property is required. string
Username for the SQL Server connection.
Password string
Password for the SQL Server connection. Note: This property is sensitive and will not be displayed in the plan.
Port int
Port for the SQL Server connection.
SecretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
database This property is required. String
Database for the SQL Server connection.
hostname This property is required. String
Hostname for the SQL Server connection.
username This property is required. String
Username for the SQL Server connection.
password String
Password for the SQL Server connection. Note: This property is sensitive and will not be displayed in the plan.
port Integer
Port for the SQL Server connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.
database This property is required. string
Database for the SQL Server connection.
hostname This property is required. string
Hostname for the SQL Server connection.
username This property is required. string
Username for the SQL Server connection.
password string
Password for the SQL Server connection. Note: This property is sensitive and will not be displayed in the plan.
port number
Port for the SQL Server connection.
secretManagerStoredPassword string
A reference to a Secret Manager resource name storing the user's password.
database This property is required. str
Database for the SQL Server connection.
hostname This property is required. str
Hostname for the SQL Server connection.
username This property is required. str
Username for the SQL Server connection.
password str
Password for the SQL Server connection. Note: This property is sensitive and will not be displayed in the plan.
port int
Port for the SQL Server connection.
secret_manager_stored_password str
A reference to a Secret Manager resource name storing the user's password.
database This property is required. String
Database for the SQL Server connection.
hostname This property is required. String
Hostname for the SQL Server connection.
username This property is required. String
Username for the SQL Server connection.
password String
Password for the SQL Server connection. Note: This property is sensitive and will not be displayed in the plan.
port Number
Port for the SQL Server connection.
secretManagerStoredPassword String
A reference to a Secret Manager resource name storing the user's password.

Import

ConnectionProfile can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/connectionProfiles/{{connection_profile_id}}

  • {{project}}/{{location}}/{{connection_profile_id}}

  • {{location}}/{{connection_profile_id}}

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

$ pulumi import gcp:datastream/connectionProfile:ConnectionProfile default projects/{{project}}/locations/{{location}}/connectionProfiles/{{connection_profile_id}}
Copy
$ pulumi import gcp:datastream/connectionProfile:ConnectionProfile default {{project}}/{{location}}/{{connection_profile_id}}
Copy
$ pulumi import gcp:datastream/connectionProfile:ConnectionProfile default {{location}}/{{connection_profile_id}}
Copy

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.