PrivateConnectionArgs

data class PrivateConnectionArgs(val createWithoutValidation: Output<Boolean>? = null, val displayName: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val privateConnectionId: Output<String>? = null, val project: Output<String>? = null, val vpcPeeringConfig: Output<PrivateConnectionVpcPeeringConfigArgs>? = null) : ConvertibleToJava<PrivateConnectionArgs>

The PrivateConnection resource is used to establish private connectivity between Datastream and a customer's network. To get more information about PrivateConnection, see:

Example Usage

Datastream Private Connection Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const defaultNetwork = new gcp.compute.Network("default", {name: "my-network"});
const _default = new gcp.datastream.PrivateConnection("default", {
displayName: "Connection profile",
location: "us-central1",
privateConnectionId: "my-connection",
labels: {
key: "value",
},
vpcPeeringConfig: {
vpc: defaultNetwork.id,
subnet: "10.0.0.0/29",
},
});
import pulumi
import pulumi_gcp as gcp
default_network = gcp.compute.Network("default", name="my-network")
default = gcp.datastream.PrivateConnection("default",
display_name="Connection profile",
location="us-central1",
private_connection_id="my-connection",
labels={
"key": "value",
},
vpc_peering_config={
"vpc": default_network.id,
"subnet": "10.0.0.0/29",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var defaultNetwork = new Gcp.Compute.Network("default", new()
{
Name = "my-network",
});
var @default = new Gcp.Datastream.PrivateConnection("default", new()
{
DisplayName = "Connection profile",
Location = "us-central1",
PrivateConnectionId = "my-connection",
Labels =
{
{ "key", "value" },
},
VpcPeeringConfig = new Gcp.Datastream.Inputs.PrivateConnectionVpcPeeringConfigArgs
{
Vpc = defaultNetwork.Id,
Subnet = "10.0.0.0/29",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/datastream"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
Name: pulumi.String("my-network"),
})
if err != nil {
return err
}
_, err = datastream.NewPrivateConnection(ctx, "default", &datastream.PrivateConnectionArgs{
DisplayName: pulumi.String("Connection profile"),
Location: pulumi.String("us-central1"),
PrivateConnectionId: pulumi.String("my-connection"),
Labels: pulumi.StringMap{
"key": pulumi.String("value"),
},
VpcPeeringConfig: &datastream.PrivateConnectionVpcPeeringConfigArgs{
Vpc: defaultNetwork.ID(),
Subnet: pulumi.String("10.0.0.0/29"),
},
})
if err != nil {
return err
}
return nil
})
}
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.datastream.PrivateConnection;
import com.pulumi.gcp.datastream.PrivateConnectionArgs;
import com.pulumi.gcp.datastream.inputs.PrivateConnectionVpcPeeringConfigArgs;
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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.name("my-network")
.build());
var default_ = new PrivateConnection("default", PrivateConnectionArgs.builder()
.displayName("Connection profile")
.location("us-central1")
.privateConnectionId("my-connection")
.labels(Map.of("key", "value"))
.vpcPeeringConfig(PrivateConnectionVpcPeeringConfigArgs.builder()
.vpc(defaultNetwork.id())
.subnet("10.0.0.0/29")
.build())
.build());
}
}
resources:
default:
type: gcp:datastream:PrivateConnection
properties:
displayName: Connection profile
location: us-central1
privateConnectionId: my-connection
labels:
key: value
vpcPeeringConfig:
vpc: ${defaultNetwork.id}
subnet: 10.0.0.0/29
defaultNetwork:
type: gcp:compute:Network
name: default
properties:
name: my-network

Import

PrivateConnection can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/privateConnections/{{private_connection_id}}

  • {{project}}/{{location}}/{{private_connection_id}}

  • {{location}}/{{private_connection_id}} When using the pulumi import command, PrivateConnection can be imported using one of the formats above. For example:

$ pulumi import gcp:datastream/privateConnection:PrivateConnection default projects/{{project}}/locations/{{location}}/privateConnections/{{private_connection_id}}
$ pulumi import gcp:datastream/privateConnection:PrivateConnection default {{project}}/{{location}}/{{private_connection_id}}
$ pulumi import gcp:datastream/privateConnection:PrivateConnection default {{location}}/{{private_connection_id}}

Constructors

Link copied to clipboard
constructor(createWithoutValidation: Output<Boolean>? = null, displayName: Output<String>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, privateConnectionId: Output<String>? = null, project: Output<String>? = null, vpcPeeringConfig: Output<PrivateConnectionVpcPeeringConfigArgs>? = null)

Properties

Link copied to clipboard
val createWithoutValidation: Output<Boolean>? = null

If set to true, will skip validations.

Link copied to clipboard
val displayName: Output<String>? = null

Display name.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

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.

Link copied to clipboard
val location: Output<String>? = null

The name of the location this private connection is located in.

Link copied to clipboard
val privateConnectionId: Output<String>? = null

The private connectivity identifier.

Link copied to clipboard
val project: Output<String>? = null
Link copied to clipboard

The VPC Peering configuration is used to create VPC peering between Datastream and the consumer's VPC. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): PrivateConnectionArgs