1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. datastream
  5. PrivateConnection
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

gcp.datastream.PrivateConnection

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi

    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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultNetwork = new Gcp.Compute.Network("defaultNetwork");
    
        var defaultPrivateConnection = new Gcp.Datastream.PrivateConnection("defaultPrivateConnection", 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/v6/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v6/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, "defaultNetwork", nil)
    		if err != nil {
    			return err
    		}
    		_, err = datastream.NewPrivateConnection(ctx, "defaultPrivateConnection", &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.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");
    
            var defaultPrivateConnection = new PrivateConnection("defaultPrivateConnection", 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());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default_network = gcp.compute.Network("defaultNetwork")
    default_private_connection = gcp.datastream.PrivateConnection("defaultPrivateConnection",
        display_name="Connection profile",
        location="us-central1",
        private_connection_id="my-connection",
        labels={
            "key": "value",
        },
        vpc_peering_config=gcp.datastream.PrivateConnectionVpcPeeringConfigArgs(
            vpc=default_network.id,
            subnet="10.0.0.0/29",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const defaultNetwork = new gcp.compute.Network("defaultNetwork", {});
    const defaultPrivateConnection = new gcp.datastream.PrivateConnection("defaultPrivateConnection", {
        displayName: "Connection profile",
        location: "us-central1",
        privateConnectionId: "my-connection",
        labels: {
            key: "value",
        },
        vpcPeeringConfig: {
            vpc: defaultNetwork.id,
            subnet: "10.0.0.0/29",
        },
    });
    
    resources:
      defaultPrivateConnection:
        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
    

    Create PrivateConnection Resource

    new PrivateConnection(name: string, args: PrivateConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def PrivateConnection(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          display_name: Optional[str] = None,
                          labels: Optional[Mapping[str, str]] = None,
                          location: Optional[str] = None,
                          private_connection_id: Optional[str] = None,
                          project: Optional[str] = None,
                          vpc_peering_config: Optional[PrivateConnectionVpcPeeringConfigArgs] = None)
    @overload
    def PrivateConnection(resource_name: str,
                          args: PrivateConnectionArgs,
                          opts: Optional[ResourceOptions] = None)
    func NewPrivateConnection(ctx *Context, name string, args PrivateConnectionArgs, opts ...ResourceOption) (*PrivateConnection, error)
    public PrivateConnection(string name, PrivateConnectionArgs args, CustomResourceOptions? opts = null)
    public PrivateConnection(String name, PrivateConnectionArgs args)
    public PrivateConnection(String name, PrivateConnectionArgs args, CustomResourceOptions options)
    
    type: gcp:datastream:PrivateConnection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args PrivateConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PrivateConnectionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PrivateConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    PrivateConnection Resource Properties

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

    Inputs

    The PrivateConnection resource accepts the following input properties:

    DisplayName string

    Display name.

    Location string

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

    PrivateConnectionId string

    The private connectivity identifier.

    VpcPeeringConfig PrivateConnectionVpcPeeringConfig

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

    Labels Dictionary<string, string>

    Labels.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    DisplayName string

    Display name.

    Location string

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

    PrivateConnectionId string

    The private connectivity identifier.

    VpcPeeringConfig PrivateConnectionVpcPeeringConfigArgs

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

    Labels map[string]string

    Labels.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName String

    Display name.

    location String

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

    privateConnectionId String

    The private connectivity identifier.

    vpcPeeringConfig PrivateConnectionVpcPeeringConfig

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

    labels Map<String,String>

    Labels.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName string

    Display name.

    location string

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

    privateConnectionId string

    The private connectivity identifier.

    vpcPeeringConfig PrivateConnectionVpcPeeringConfig

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

    labels {[key: string]: string}

    Labels.

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    display_name str

    Display name.

    location str

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

    private_connection_id str

    The private connectivity identifier.

    vpc_peering_config PrivateConnectionVpcPeeringConfigArgs

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

    labels Mapping[str, str]

    Labels.

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    displayName String

    Display name.

    location String

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

    privateConnectionId String

    The private connectivity identifier.

    vpcPeeringConfig Property Map

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

    labels Map<String>

    Labels.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

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

    Errors List<PrivateConnectionError>

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The resource's name.

    State string

    State of the PrivateConnection.

    Errors []PrivateConnectionError

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The resource's name.

    State string

    State of the PrivateConnection.

    errors List<PrivateConnectionError>

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

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The resource's name.

    state String

    State of the PrivateConnection.

    errors PrivateConnectionError[]

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

    id string

    The provider-assigned unique ID for this managed resource.

    name string

    The resource's name.

    state string

    State of the PrivateConnection.

    errors Sequence[PrivateConnectionError]

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

    id str

    The provider-assigned unique ID for this managed resource.

    name str

    The resource's name.

    state str

    State of the PrivateConnection.

    errors List<Property Map>

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

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The resource's name.

    state String

    State of the PrivateConnection.

    Look up Existing PrivateConnection Resource

    Get an existing PrivateConnection 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?: PrivateConnectionState, opts?: CustomResourceOptions): PrivateConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            errors: Optional[Sequence[PrivateConnectionErrorArgs]] = None,
            labels: Optional[Mapping[str, str]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            private_connection_id: Optional[str] = None,
            project: Optional[str] = None,
            state: Optional[str] = None,
            vpc_peering_config: Optional[PrivateConnectionVpcPeeringConfigArgs] = None) -> PrivateConnection
    func GetPrivateConnection(ctx *Context, name string, id IDInput, state *PrivateConnectionState, opts ...ResourceOption) (*PrivateConnection, error)
    public static PrivateConnection Get(string name, Input<string> id, PrivateConnectionState? state, CustomResourceOptions? opts = null)
    public static PrivateConnection get(String name, Output<String> id, PrivateConnectionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DisplayName string

    Display name.

    Errors List<PrivateConnectionError>

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

    Labels Dictionary<string, string>

    Labels.

    Location string

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

    Name string

    The resource's name.

    PrivateConnectionId string

    The private connectivity identifier.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    State string

    State of the PrivateConnection.

    VpcPeeringConfig PrivateConnectionVpcPeeringConfig

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

    DisplayName string

    Display name.

    Errors []PrivateConnectionErrorArgs

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

    Labels map[string]string

    Labels.

    Location string

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

    Name string

    The resource's name.

    PrivateConnectionId string

    The private connectivity identifier.

    Project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    State string

    State of the PrivateConnection.

    VpcPeeringConfig PrivateConnectionVpcPeeringConfigArgs

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

    displayName String

    Display name.

    errors List<PrivateConnectionError>

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

    labels Map<String,String>

    Labels.

    location String

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

    name String

    The resource's name.

    privateConnectionId String

    The private connectivity identifier.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    state String

    State of the PrivateConnection.

    vpcPeeringConfig PrivateConnectionVpcPeeringConfig

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

    displayName string

    Display name.

    errors PrivateConnectionError[]

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

    labels {[key: string]: string}

    Labels.

    location string

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

    name string

    The resource's name.

    privateConnectionId string

    The private connectivity identifier.

    project string

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    state string

    State of the PrivateConnection.

    vpcPeeringConfig PrivateConnectionVpcPeeringConfig

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

    display_name str

    Display name.

    errors Sequence[PrivateConnectionErrorArgs]

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

    labels Mapping[str, str]

    Labels.

    location str

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

    name str

    The resource's name.

    private_connection_id str

    The private connectivity identifier.

    project str

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    state str

    State of the PrivateConnection.

    vpc_peering_config PrivateConnectionVpcPeeringConfigArgs

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

    displayName String

    Display name.

    errors List<Property Map>

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

    labels Map<String>

    Labels.

    location String

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

    name String

    The resource's name.

    privateConnectionId String

    The private connectivity identifier.

    project String

    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    state String

    State of the PrivateConnection.

    vpcPeeringConfig Property Map

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

    Supporting Types

    PrivateConnectionError, PrivateConnectionErrorArgs

    Details Dictionary<string, string>

    A list of messages that carry the error details.

    Message string

    A message containing more information about the error that occurred.

    Details map[string]string

    A list of messages that carry the error details.

    Message string

    A message containing more information about the error that occurred.

    details Map<String,String>

    A list of messages that carry the error details.

    message String

    A message containing more information about the error that occurred.

    details {[key: string]: string}

    A list of messages that carry the error details.

    message string

    A message containing more information about the error that occurred.

    details Mapping[str, str]

    A list of messages that carry the error details.

    message str

    A message containing more information about the error that occurred.

    details Map<String>

    A list of messages that carry the error details.

    message String

    A message containing more information about the error that occurred.

    PrivateConnectionVpcPeeringConfig, PrivateConnectionVpcPeeringConfigArgs

    Subnet string

    A free subnet for peering. (CIDR of /29)


    Vpc string

    Fully qualified name of the VPC that Datastream will peer to. Format: projects/{project}/global/{networks}/{name}

    Subnet string

    A free subnet for peering. (CIDR of /29)


    Vpc string

    Fully qualified name of the VPC that Datastream will peer to. Format: projects/{project}/global/{networks}/{name}

    subnet String

    A free subnet for peering. (CIDR of /29)


    vpc String

    Fully qualified name of the VPC that Datastream will peer to. Format: projects/{project}/global/{networks}/{name}

    subnet string

    A free subnet for peering. (CIDR of /29)


    vpc string

    Fully qualified name of the VPC that Datastream will peer to. Format: projects/{project}/global/{networks}/{name}

    subnet str

    A free subnet for peering. (CIDR of /29)


    vpc str

    Fully qualified name of the VPC that Datastream will peer to. Format: projects/{project}/global/{networks}/{name}

    subnet String

    A free subnet for peering. (CIDR of /29)


    vpc String

    Fully qualified name of the VPC that Datastream will peer to. Format: projects/{project}/global/{networks}/{name}

    Import

    PrivateConnection can be imported using any of these accepted formats

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

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the google-beta Terraform Provider.

    gcp logo
    Google Cloud Classic v6.67.0 published on Wednesday, Sep 27, 2023 by Pulumi