1. Packages
  2. AWS
  3. API Docs
  4. msk
  5. VpcConnection
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.msk.VpcConnection

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Resource for managing an AWS Managed Streaming for Kafka VPC Connection.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.msk.VpcConnection("test", {
        authentication: "SASL_IAM",
        targetClusterArn: "aws_msk_cluster.arn",
        vpcId: testAwsVpc.id,
        clientSubnets: testAwsSubnet.map(__item => __item.id),
        securityGroups: [testAwsSecurityGroup.id],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.msk.VpcConnection("test",
        authentication="SASL_IAM",
        target_cluster_arn="aws_msk_cluster.arn",
        vpc_id=test_aws_vpc["id"],
        client_subnets=[__item["id"] for __item in test_aws_subnet],
        security_groups=[test_aws_security_group["id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    var splat0 []interface{}
    for _, val0 := range testAwsSubnet {
    splat0 = append(splat0, val0.Id)
    }
    _, err := msk.NewVpcConnection(ctx, "test", &msk.VpcConnectionArgs{
    Authentication: pulumi.String("SASL_IAM"),
    TargetClusterArn: pulumi.String("aws_msk_cluster.arn"),
    VpcId: pulumi.Any(testAwsVpc.Id),
    ClientSubnets: toPulumiArray(splat0),
    SecurityGroups: pulumi.StringArray{
    testAwsSecurityGroup.Id,
    },
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    func toPulumiArray(arr []) pulumi.Array {
    var pulumiArr pulumi.Array
    for _, v := range arr {
    pulumiArr = append(pulumiArr, pulumi.(v))
    }
    return pulumiArr
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Aws.Msk.VpcConnection("test", new()
        {
            Authentication = "SASL_IAM",
            TargetClusterArn = "aws_msk_cluster.arn",
            VpcId = testAwsVpc.Id,
            ClientSubnets = testAwsSubnet.Select(__item => __item.Id).ToList(),
            SecurityGroups = new[]
            {
                testAwsSecurityGroup.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.msk.VpcConnection;
    import com.pulumi.aws.msk.VpcConnectionArgs;
    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 test = new VpcConnection("test", VpcConnectionArgs.builder()
                .authentication("SASL_IAM")
                .targetClusterArn("aws_msk_cluster.arn")
                .vpcId(testAwsVpc.id())
                .clientSubnets(testAwsSubnet.stream().map(element -> element.id()).collect(toList()))
                .securityGroups(testAwsSecurityGroup.id())
                .build());
    
        }
    }
    
    Coming soon!
    

    Create VpcConnection Resource

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

    Constructor syntax

    new VpcConnection(name: string, args: VpcConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def VpcConnection(resource_name: str,
                      args: VpcConnectionArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcConnection(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      authentication: Optional[str] = None,
                      client_subnets: Optional[Sequence[str]] = None,
                      security_groups: Optional[Sequence[str]] = None,
                      target_cluster_arn: Optional[str] = None,
                      vpc_id: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None)
    func NewVpcConnection(ctx *Context, name string, args VpcConnectionArgs, opts ...ResourceOption) (*VpcConnection, error)
    public VpcConnection(string name, VpcConnectionArgs args, CustomResourceOptions? opts = null)
    public VpcConnection(String name, VpcConnectionArgs args)
    public VpcConnection(String name, VpcConnectionArgs args, CustomResourceOptions options)
    
    type: aws:msk:VpcConnection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VpcConnectionArgs
    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 VpcConnectionArgs
    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 VpcConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcConnectionArgs
    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 vpcConnectionResource = new Aws.Msk.VpcConnection("vpcConnectionResource", new()
    {
        Authentication = "string",
        ClientSubnets = new[]
        {
            "string",
        },
        SecurityGroups = new[]
        {
            "string",
        },
        TargetClusterArn = "string",
        VpcId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := msk.NewVpcConnection(ctx, "vpcConnectionResource", &msk.VpcConnectionArgs{
    	Authentication: pulumi.String("string"),
    	ClientSubnets: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SecurityGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TargetClusterArn: pulumi.String("string"),
    	VpcId:            pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var vpcConnectionResource = new VpcConnection("vpcConnectionResource", VpcConnectionArgs.builder()
        .authentication("string")
        .clientSubnets("string")
        .securityGroups("string")
        .targetClusterArn("string")
        .vpcId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    vpc_connection_resource = aws.msk.VpcConnection("vpcConnectionResource",
        authentication="string",
        client_subnets=["string"],
        security_groups=["string"],
        target_cluster_arn="string",
        vpc_id="string",
        tags={
            "string": "string",
        })
    
    const vpcConnectionResource = new aws.msk.VpcConnection("vpcConnectionResource", {
        authentication: "string",
        clientSubnets: ["string"],
        securityGroups: ["string"],
        targetClusterArn: "string",
        vpcId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:msk:VpcConnection
    properties:
        authentication: string
        clientSubnets:
            - string
        securityGroups:
            - string
        tags:
            string: string
        targetClusterArn: string
        vpcId: string
    

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

    Authentication string
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    ClientSubnets List<string>
    The list of subnets in the client VPC to connect to.
    SecurityGroups List<string>
    The security groups to attach to the ENIs for the broker nodes.
    TargetClusterArn string
    The Amazon Resource Name (ARN) of the cluster.
    VpcId string
    The VPC ID of the remote client.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Authentication string
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    ClientSubnets []string
    The list of subnets in the client VPC to connect to.
    SecurityGroups []string
    The security groups to attach to the ENIs for the broker nodes.
    TargetClusterArn string
    The Amazon Resource Name (ARN) of the cluster.
    VpcId string
    The VPC ID of the remote client.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    authentication String
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    clientSubnets List<String>
    The list of subnets in the client VPC to connect to.
    securityGroups List<String>
    The security groups to attach to the ENIs for the broker nodes.
    targetClusterArn String
    The Amazon Resource Name (ARN) of the cluster.
    vpcId String
    The VPC ID of the remote client.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    authentication string
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    clientSubnets string[]
    The list of subnets in the client VPC to connect to.
    securityGroups string[]
    The security groups to attach to the ENIs for the broker nodes.
    targetClusterArn string
    The Amazon Resource Name (ARN) of the cluster.
    vpcId string
    The VPC ID of the remote client.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    authentication str
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    client_subnets Sequence[str]
    The list of subnets in the client VPC to connect to.
    security_groups Sequence[str]
    The security groups to attach to the ENIs for the broker nodes.
    target_cluster_arn str
    The Amazon Resource Name (ARN) of the cluster.
    vpc_id str
    The VPC ID of the remote client.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    authentication String
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    clientSubnets List<String>
    The list of subnets in the client VPC to connect to.
    securityGroups List<String>
    The security groups to attach to the ENIs for the broker nodes.
    targetClusterArn String
    The Amazon Resource Name (ARN) of the cluster.
    vpcId String
    The VPC ID of the remote client.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    Amazon Resource Name (ARN) of the VPC connection.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of the VPC connection.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the VPC connection.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of the VPC connection.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of the VPC connection.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the VPC connection.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing VpcConnection Resource

    Get an existing VpcConnection 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?: VpcConnectionState, opts?: CustomResourceOptions): VpcConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            authentication: Optional[str] = None,
            client_subnets: Optional[Sequence[str]] = None,
            security_groups: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            target_cluster_arn: Optional[str] = None,
            vpc_id: Optional[str] = None) -> VpcConnection
    func GetVpcConnection(ctx *Context, name string, id IDInput, state *VpcConnectionState, opts ...ResourceOption) (*VpcConnection, error)
    public static VpcConnection Get(string name, Input<string> id, VpcConnectionState? state, CustomResourceOptions? opts = null)
    public static VpcConnection get(String name, Output<String> id, VpcConnectionState 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:
    Arn string
    Amazon Resource Name (ARN) of the VPC connection.
    Authentication string
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    ClientSubnets List<string>
    The list of subnets in the client VPC to connect to.
    SecurityGroups List<string>
    The security groups to attach to the ENIs for the broker nodes.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TargetClusterArn string
    The Amazon Resource Name (ARN) of the cluster.
    VpcId string
    The VPC ID of the remote client.
    Arn string
    Amazon Resource Name (ARN) of the VPC connection.
    Authentication string
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    ClientSubnets []string
    The list of subnets in the client VPC to connect to.
    SecurityGroups []string
    The security groups to attach to the ENIs for the broker nodes.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    TargetClusterArn string
    The Amazon Resource Name (ARN) of the cluster.
    VpcId string
    The VPC ID of the remote client.
    arn String
    Amazon Resource Name (ARN) of the VPC connection.
    authentication String
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    clientSubnets List<String>
    The list of subnets in the client VPC to connect to.
    securityGroups List<String>
    The security groups to attach to the ENIs for the broker nodes.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targetClusterArn String
    The Amazon Resource Name (ARN) of the cluster.
    vpcId String
    The VPC ID of the remote client.
    arn string
    Amazon Resource Name (ARN) of the VPC connection.
    authentication string
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    clientSubnets string[]
    The list of subnets in the client VPC to connect to.
    securityGroups string[]
    The security groups to attach to the ENIs for the broker nodes.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targetClusterArn string
    The Amazon Resource Name (ARN) of the cluster.
    vpcId string
    The VPC ID of the remote client.
    arn str
    Amazon Resource Name (ARN) of the VPC connection.
    authentication str
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    client_subnets Sequence[str]
    The list of subnets in the client VPC to connect to.
    security_groups Sequence[str]
    The security groups to attach to the ENIs for the broker nodes.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    target_cluster_arn str
    The Amazon Resource Name (ARN) of the cluster.
    vpc_id str
    The VPC ID of the remote client.
    arn String
    Amazon Resource Name (ARN) of the VPC connection.
    authentication String
    The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
    clientSubnets List<String>
    The list of subnets in the client VPC to connect to.
    securityGroups List<String>
    The security groups to attach to the ENIs for the broker nodes.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    targetClusterArn String
    The Amazon Resource Name (ARN) of the cluster.
    vpcId String
    The VPC ID of the remote client.

    Import

    Using pulumi import, import MSK configurations using the configuration ARN. For example:

    $ pulumi import aws:msk/vpcConnection:VpcConnection example arn:aws:kafka:eu-west-2:123456789012:vpc-connection/123456789012/example/38173259-79cd-4ee8-87f3-682ea6023f48-2
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi