PrivateConnection

class PrivateConnection : KotlinCustomResource

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}}

Properties

Link copied to clipboard

If set to true, will skip validations.

Link copied to clipboard
val displayName: Output<String>

Display name.

Link copied to clipboard

All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.

Link copied to clipboard

The PrivateConnection error in case of failure. Structure is documented below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<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.

Link copied to clipboard
val location: Output<String>

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

Link copied to clipboard
val name: Output<String>

The resource's name.

Link copied to clipboard

The private connectivity identifier.

Link copied to clipboard
val project: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
val pulumiLabels: Output<Map<String, String>>

The combination of labels configured directly on the resource and default labels configured on the provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>

State of the PrivateConnection.

Link copied to clipboard
val urn: Output<String>
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.