1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. StreamConnection
MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi
mongodbatlas logo
MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi

    mongodbatlas.StreamConnection provides a Stream Connection resource. The resource lets you create, edit, and delete stream instance connections.

    IMPORTANT: All arguments including the Kafka authentication password will be stored in the raw state as plaintext. Read more about sensitive data in state.

    Example Usage

    Example Cluster Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.StreamConnection("test", {
        projectId: projectId,
        workspaceName: "WorkspaceName",
        connectionName: "ConnectionName",
        type: "Cluster",
        clusterName: "Cluster0",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.StreamConnection("test",
        project_id=project_id,
        workspace_name="WorkspaceName",
        connection_name="ConnectionName",
        type="Cluster",
        cluster_name="Cluster0")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewStreamConnection(ctx, "test", &mongodbatlas.StreamConnectionArgs{
    			ProjectId:      pulumi.Any(projectId),
    			WorkspaceName:  pulumi.String("WorkspaceName"),
    			ConnectionName: pulumi.String("ConnectionName"),
    			Type:           pulumi.String("Cluster"),
    			ClusterName:    pulumi.String("Cluster0"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.StreamConnection("test", new()
        {
            ProjectId = projectId,
            WorkspaceName = "WorkspaceName",
            ConnectionName = "ConnectionName",
            Type = "Cluster",
            ClusterName = "Cluster0",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.StreamConnection;
    import com.pulumi.mongodbatlas.StreamConnectionArgs;
    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 StreamConnection("test", StreamConnectionArgs.builder()
                .projectId(projectId)
                .workspaceName("WorkspaceName")
                .connectionName("ConnectionName")
                .type("Cluster")
                .clusterName("Cluster0")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:StreamConnection
        properties:
          projectId: ${projectId}
          workspaceName: WorkspaceName
          connectionName: ConnectionName
          type: Cluster
          clusterName: Cluster0
    

    Further Examples

    • Atlas Stream Connection

    Example Cross Project Cluster Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.StreamConnection("test", {
        projectId: projectId,
        workspaceName: "WorskpaceName",
        connectionName: "ConnectionName",
        type: "Cluster",
        clusterName: "OtherCluster",
        clusterProjectId: otherProjectId,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.StreamConnection("test",
        project_id=project_id,
        workspace_name="WorskpaceName",
        connection_name="ConnectionName",
        type="Cluster",
        cluster_name="OtherCluster",
        cluster_project_id=other_project_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewStreamConnection(ctx, "test", &mongodbatlas.StreamConnectionArgs{
    			ProjectId:        pulumi.Any(projectId),
    			WorkspaceName:    pulumi.String("WorskpaceName"),
    			ConnectionName:   pulumi.String("ConnectionName"),
    			Type:             pulumi.String("Cluster"),
    			ClusterName:      pulumi.String("OtherCluster"),
    			ClusterProjectId: pulumi.Any(otherProjectId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.StreamConnection("test", new()
        {
            ProjectId = projectId,
            WorkspaceName = "WorskpaceName",
            ConnectionName = "ConnectionName",
            Type = "Cluster",
            ClusterName = "OtherCluster",
            ClusterProjectId = otherProjectId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.StreamConnection;
    import com.pulumi.mongodbatlas.StreamConnectionArgs;
    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 StreamConnection("test", StreamConnectionArgs.builder()
                .projectId(projectId)
                .workspaceName("WorskpaceName")
                .connectionName("ConnectionName")
                .type("Cluster")
                .clusterName("OtherCluster")
                .clusterProjectId(otherProjectId)
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:StreamConnection
        properties:
          projectId: ${projectId}
          workspaceName: WorskpaceName
          connectionName: ConnectionName
          type: Cluster
          clusterName: OtherCluster
          clusterProjectId: ${otherProjectId}
    

    Example Kafka SASL Plaintext Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.StreamConnection("test", {
        projectId: projectId,
        workspaceName: "NewWorkspace",
        connectionName: "KafkaConnection",
        type: "Kafka",
        authentication: {
            mechanism: "SCRAM-256",
            username: "user",
            password: "somepassword",
        },
        security: {
            protocol: "SASL_PLAINTEXT",
        },
        config: {
            "auto.offset.reset": "latest",
        },
        bootstrapServers: "localhost:9091,localhost:9092",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.StreamConnection("test",
        project_id=project_id,
        workspace_name="NewWorkspace",
        connection_name="KafkaConnection",
        type="Kafka",
        authentication={
            "mechanism": "SCRAM-256",
            "username": "user",
            "password": "somepassword",
        },
        security={
            "protocol": "SASL_PLAINTEXT",
        },
        config={
            "auto.offset.reset": "latest",
        },
        bootstrap_servers="localhost:9091,localhost:9092")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewStreamConnection(ctx, "test", &mongodbatlas.StreamConnectionArgs{
    			ProjectId:      pulumi.Any(projectId),
    			WorkspaceName:  pulumi.String("NewWorkspace"),
    			ConnectionName: pulumi.String("KafkaConnection"),
    			Type:           pulumi.String("Kafka"),
    			Authentication: &mongodbatlas.StreamConnectionAuthenticationArgs{
    				Mechanism: pulumi.String("SCRAM-256"),
    				Username:  pulumi.String("user"),
    				Password:  pulumi.String("somepassword"),
    			},
    			Security: &mongodbatlas.StreamConnectionSecurityArgs{
    				Protocol: pulumi.String("SASL_PLAINTEXT"),
    			},
    			Config: pulumi.StringMap{
    				"auto.offset.reset": pulumi.String("latest"),
    			},
    			BootstrapServers: pulumi.String("localhost:9091,localhost:9092"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.StreamConnection("test", new()
        {
            ProjectId = projectId,
            WorkspaceName = "NewWorkspace",
            ConnectionName = "KafkaConnection",
            Type = "Kafka",
            Authentication = new Mongodbatlas.Inputs.StreamConnectionAuthenticationArgs
            {
                Mechanism = "SCRAM-256",
                Username = "user",
                Password = "somepassword",
            },
            Security = new Mongodbatlas.Inputs.StreamConnectionSecurityArgs
            {
                Protocol = "SASL_PLAINTEXT",
            },
            Config = 
            {
                { "auto.offset.reset", "latest" },
            },
            BootstrapServers = "localhost:9091,localhost:9092",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.StreamConnection;
    import com.pulumi.mongodbatlas.StreamConnectionArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionAuthenticationArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionSecurityArgs;
    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 StreamConnection("test", StreamConnectionArgs.builder()
                .projectId(projectId)
                .workspaceName("NewWorkspace")
                .connectionName("KafkaConnection")
                .type("Kafka")
                .authentication(StreamConnectionAuthenticationArgs.builder()
                    .mechanism("SCRAM-256")
                    .username("user")
                    .password("somepassword")
                    .build())
                .security(StreamConnectionSecurityArgs.builder()
                    .protocol("SASL_PLAINTEXT")
                    .build())
                .config(Map.of("auto.offset.reset", "latest"))
                .bootstrapServers("localhost:9091,localhost:9092")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:StreamConnection
        properties:
          projectId: ${projectId}
          workspaceName: NewWorkspace
          connectionName: KafkaConnection
          type: Kafka
          authentication:
            mechanism: SCRAM-256
            username: user
            password: somepassword
          security:
            protocol: SASL_PLAINTEXT
          config:
            auto.offset.reset: latest
          bootstrapServers: localhost:9091,localhost:9092
    

    Example Kafka SASL OAuthbearer Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const example_kafka_oauthbearer = new mongodbatlas.StreamConnection("example-kafka-oauthbearer", {
        projectId: projectId,
        instanceName: example.instanceName,
        connectionName: "KafkaOAuthbearerConnection",
        type: "Kafka",
        authentication: {
            mechanism: "OAUTHBEARER",
            method: "OIDC",
            tokenEndpointUrl: "https://example.com/oauth/token",
            clientId: "auth0Client",
            clientSecret: kafkaClientSecret,
            scope: "read:messages write:messages",
            saslOauthbearerExtensions: "logicalCluster=lkc-kmom,identityPoolId=pool-lAr",
        },
        bootstrapServers: "localhost:9092,localhost:9092",
        config: {
            "auto.offset.reset": "earliest",
        },
        security: {
            protocol: "SASL_PLAINTEXT",
        },
        networking: {
            access: {
                type: "PUBLIC",
            },
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    example_kafka_oauthbearer = mongodbatlas.StreamConnection("example-kafka-oauthbearer",
        project_id=project_id,
        instance_name=example["instanceName"],
        connection_name="KafkaOAuthbearerConnection",
        type="Kafka",
        authentication={
            "mechanism": "OAUTHBEARER",
            "method": "OIDC",
            "token_endpoint_url": "https://example.com/oauth/token",
            "client_id": "auth0Client",
            "client_secret": kafka_client_secret,
            "scope": "read:messages write:messages",
            "sasl_oauthbearer_extensions": "logicalCluster=lkc-kmom,identityPoolId=pool-lAr",
        },
        bootstrap_servers="localhost:9092,localhost:9092",
        config={
            "auto.offset.reset": "earliest",
        },
        security={
            "protocol": "SASL_PLAINTEXT",
        },
        networking={
            "access": {
                "type": "PUBLIC",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewStreamConnection(ctx, "example-kafka-oauthbearer", &mongodbatlas.StreamConnectionArgs{
    			ProjectId:      pulumi.Any(projectId),
    			InstanceName:   pulumi.Any(example.InstanceName),
    			ConnectionName: pulumi.String("KafkaOAuthbearerConnection"),
    			Type:           pulumi.String("Kafka"),
    			Authentication: &mongodbatlas.StreamConnectionAuthenticationArgs{
    				Mechanism:                 pulumi.String("OAUTHBEARER"),
    				Method:                    pulumi.String("OIDC"),
    				TokenEndpointUrl:          pulumi.String("https://example.com/oauth/token"),
    				ClientId:                  pulumi.String("auth0Client"),
    				ClientSecret:              pulumi.Any(kafkaClientSecret),
    				Scope:                     pulumi.String("read:messages write:messages"),
    				SaslOauthbearerExtensions: pulumi.String("logicalCluster=lkc-kmom,identityPoolId=pool-lAr"),
    			},
    			BootstrapServers: pulumi.String("localhost:9092,localhost:9092"),
    			Config: pulumi.StringMap{
    				"auto.offset.reset": pulumi.String("earliest"),
    			},
    			Security: &mongodbatlas.StreamConnectionSecurityArgs{
    				Protocol: pulumi.String("SASL_PLAINTEXT"),
    			},
    			Networking: &mongodbatlas.StreamConnectionNetworkingArgs{
    				Access: &mongodbatlas.StreamConnectionNetworkingAccessArgs{
    					Type: pulumi.String("PUBLIC"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var example_kafka_oauthbearer = new Mongodbatlas.StreamConnection("example-kafka-oauthbearer", new()
        {
            ProjectId = projectId,
            InstanceName = example.InstanceName,
            ConnectionName = "KafkaOAuthbearerConnection",
            Type = "Kafka",
            Authentication = new Mongodbatlas.Inputs.StreamConnectionAuthenticationArgs
            {
                Mechanism = "OAUTHBEARER",
                Method = "OIDC",
                TokenEndpointUrl = "https://example.com/oauth/token",
                ClientId = "auth0Client",
                ClientSecret = kafkaClientSecret,
                Scope = "read:messages write:messages",
                SaslOauthbearerExtensions = "logicalCluster=lkc-kmom,identityPoolId=pool-lAr",
            },
            BootstrapServers = "localhost:9092,localhost:9092",
            Config = 
            {
                { "auto.offset.reset", "earliest" },
            },
            Security = new Mongodbatlas.Inputs.StreamConnectionSecurityArgs
            {
                Protocol = "SASL_PLAINTEXT",
            },
            Networking = new Mongodbatlas.Inputs.StreamConnectionNetworkingArgs
            {
                Access = new Mongodbatlas.Inputs.StreamConnectionNetworkingAccessArgs
                {
                    Type = "PUBLIC",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.StreamConnection;
    import com.pulumi.mongodbatlas.StreamConnectionArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionAuthenticationArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionSecurityArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionNetworkingArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionNetworkingAccessArgs;
    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 example_kafka_oauthbearer = new StreamConnection("example-kafka-oauthbearer", StreamConnectionArgs.builder()
                .projectId(projectId)
                .instanceName(example.instanceName())
                .connectionName("KafkaOAuthbearerConnection")
                .type("Kafka")
                .authentication(StreamConnectionAuthenticationArgs.builder()
                    .mechanism("OAUTHBEARER")
                    .method("OIDC")
                    .tokenEndpointUrl("https://example.com/oauth/token")
                    .clientId("auth0Client")
                    .clientSecret(kafkaClientSecret)
                    .scope("read:messages write:messages")
                    .saslOauthbearerExtensions("logicalCluster=lkc-kmom,identityPoolId=pool-lAr")
                    .build())
                .bootstrapServers("localhost:9092,localhost:9092")
                .config(Map.of("auto.offset.reset", "earliest"))
                .security(StreamConnectionSecurityArgs.builder()
                    .protocol("SASL_PLAINTEXT")
                    .build())
                .networking(StreamConnectionNetworkingArgs.builder()
                    .access(StreamConnectionNetworkingAccessArgs.builder()
                        .type("PUBLIC")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example-kafka-oauthbearer:
        type: mongodbatlas:StreamConnection
        properties:
          projectId: ${projectId}
          instanceName: ${example.instanceName}
          connectionName: KafkaOAuthbearerConnection
          type: Kafka
          authentication:
            mechanism: OAUTHBEARER
            method: OIDC
            tokenEndpointUrl: https://example.com/oauth/token
            clientId: auth0Client
            clientSecret: ${kafkaClientSecret}
            scope: read:messages write:messages
            saslOauthbearerExtensions: logicalCluster=lkc-kmom,identityPoolId=pool-lAr
          bootstrapServers: localhost:9092,localhost:9092
          config:
            auto.offset.reset: earliest
          security:
            protocol: SASL_PLAINTEXT
          networking:
            access:
              type: PUBLIC
    

    Example Kafka SASL SSL Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.StreamConnection("test", {
        projectId: projectId,
        workspaceName: "NewWorkspace",
        connectionName: "KafkaConnection",
        type: "Kafka",
        authentication: {
            mechanism: "PLAIN",
            username: "user",
            password: "somepassword",
        },
        security: {
            protocol: "SASL_SSL",
            brokerPublicCertificate: "-----BEGIN CERTIFICATE-----<CONTENT>-----END CERTIFICATE-----",
        },
        config: {
            "auto.offset.reset": "latest",
        },
        bootstrapServers: "localhost:9091,localhost:9092",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.StreamConnection("test",
        project_id=project_id,
        workspace_name="NewWorkspace",
        connection_name="KafkaConnection",
        type="Kafka",
        authentication={
            "mechanism": "PLAIN",
            "username": "user",
            "password": "somepassword",
        },
        security={
            "protocol": "SASL_SSL",
            "broker_public_certificate": "-----BEGIN CERTIFICATE-----<CONTENT>-----END CERTIFICATE-----",
        },
        config={
            "auto.offset.reset": "latest",
        },
        bootstrap_servers="localhost:9091,localhost:9092")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewStreamConnection(ctx, "test", &mongodbatlas.StreamConnectionArgs{
    			ProjectId:      pulumi.Any(projectId),
    			WorkspaceName:  pulumi.String("NewWorkspace"),
    			ConnectionName: pulumi.String("KafkaConnection"),
    			Type:           pulumi.String("Kafka"),
    			Authentication: &mongodbatlas.StreamConnectionAuthenticationArgs{
    				Mechanism: pulumi.String("PLAIN"),
    				Username:  pulumi.String("user"),
    				Password:  pulumi.String("somepassword"),
    			},
    			Security: &mongodbatlas.StreamConnectionSecurityArgs{
    				Protocol:                pulumi.String("SASL_SSL"),
    				BrokerPublicCertificate: pulumi.String("-----BEGIN CERTIFICATE-----<CONTENT>-----END CERTIFICATE-----"),
    			},
    			Config: pulumi.StringMap{
    				"auto.offset.reset": pulumi.String("latest"),
    			},
    			BootstrapServers: pulumi.String("localhost:9091,localhost:9092"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.StreamConnection("test", new()
        {
            ProjectId = projectId,
            WorkspaceName = "NewWorkspace",
            ConnectionName = "KafkaConnection",
            Type = "Kafka",
            Authentication = new Mongodbatlas.Inputs.StreamConnectionAuthenticationArgs
            {
                Mechanism = "PLAIN",
                Username = "user",
                Password = "somepassword",
            },
            Security = new Mongodbatlas.Inputs.StreamConnectionSecurityArgs
            {
                Protocol = "SASL_SSL",
                BrokerPublicCertificate = "-----BEGIN CERTIFICATE-----<CONTENT>-----END CERTIFICATE-----",
            },
            Config = 
            {
                { "auto.offset.reset", "latest" },
            },
            BootstrapServers = "localhost:9091,localhost:9092",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.StreamConnection;
    import com.pulumi.mongodbatlas.StreamConnectionArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionAuthenticationArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionSecurityArgs;
    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 StreamConnection("test", StreamConnectionArgs.builder()
                .projectId(projectId)
                .workspaceName("NewWorkspace")
                .connectionName("KafkaConnection")
                .type("Kafka")
                .authentication(StreamConnectionAuthenticationArgs.builder()
                    .mechanism("PLAIN")
                    .username("user")
                    .password("somepassword")
                    .build())
                .security(StreamConnectionSecurityArgs.builder()
                    .protocol("SASL_SSL")
                    .brokerPublicCertificate("-----BEGIN CERTIFICATE-----<CONTENT>-----END CERTIFICATE-----")
                    .build())
                .config(Map.of("auto.offset.reset", "latest"))
                .bootstrapServers("localhost:9091,localhost:9092")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:StreamConnection
        properties:
          projectId: ${projectId}
          workspaceName: NewWorkspace
          connectionName: KafkaConnection
          type: Kafka
          authentication:
            mechanism: PLAIN
            username: user
            password: somepassword
          security:
            protocol: SASL_SSL
            brokerPublicCertificate: '-----BEGIN CERTIFICATE-----<CONTENT>-----END CERTIFICATE-----'
          config:
            auto.offset.reset: latest
          bootstrapServers: localhost:9091,localhost:9092
    

    Example AWSLambda Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.StreamConnection("test", {
        projectId: projectId,
        workspaceName: "NewWorkspace",
        connectionName: "AWSLambdaConnection",
        type: "AWSLambda",
        aws: {
            roleArn: "arn:aws:iam::<AWS_ACCOUNT_ID>:role/lambdaRole",
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.StreamConnection("test",
        project_id=project_id,
        workspace_name="NewWorkspace",
        connection_name="AWSLambdaConnection",
        type="AWSLambda",
        aws={
            "role_arn": "arn:aws:iam::<AWS_ACCOUNT_ID>:role/lambdaRole",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewStreamConnection(ctx, "test", &mongodbatlas.StreamConnectionArgs{
    			ProjectId:      pulumi.Any(projectId),
    			WorkspaceName:  pulumi.String("NewWorkspace"),
    			ConnectionName: pulumi.String("AWSLambdaConnection"),
    			Type:           pulumi.String("AWSLambda"),
    			Aws: &mongodbatlas.StreamConnectionAwsArgs{
    				RoleArn: pulumi.String("arn:aws:iam::<AWS_ACCOUNT_ID>:role/lambdaRole"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.StreamConnection("test", new()
        {
            ProjectId = projectId,
            WorkspaceName = "NewWorkspace",
            ConnectionName = "AWSLambdaConnection",
            Type = "AWSLambda",
            Aws = new Mongodbatlas.Inputs.StreamConnectionAwsArgs
            {
                RoleArn = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/lambdaRole",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.StreamConnection;
    import com.pulumi.mongodbatlas.StreamConnectionArgs;
    import com.pulumi.mongodbatlas.inputs.StreamConnectionAwsArgs;
    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 StreamConnection("test", StreamConnectionArgs.builder()
                .projectId(projectId)
                .workspaceName("NewWorkspace")
                .connectionName("AWSLambdaConnection")
                .type("AWSLambda")
                .aws(StreamConnectionAwsArgs.builder()
                    .roleArn("arn:aws:iam::<AWS_ACCOUNT_ID>:role/lambdaRole")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:StreamConnection
        properties:
          projectId: ${projectId}
          workspaceName: NewWorkspace
          connectionName: AWSLambdaConnection
          type: AWSLambda
          aws:
            roleArn: arn:aws:iam::<AWS_ACCOUNT_ID>:role/lambdaRole
    

    Example Https Connection

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const example_https = new mongodbatlas.StreamConnection("example-https", {
        projectId: projectId,
        workspaceName: example.instanceName,
        connectionName: "https_connection_tf_new",
        type: "Https",
        url: "https://example.com",
        headers: {
            key1: "value1",
            key2: "value2",
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    example_https = mongodbatlas.StreamConnection("example-https",
        project_id=project_id,
        workspace_name=example["instanceName"],
        connection_name="https_connection_tf_new",
        type="Https",
        url="https://example.com",
        headers={
            "key1": "value1",
            "key2": "value2",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewStreamConnection(ctx, "example-https", &mongodbatlas.StreamConnectionArgs{
    			ProjectId:      pulumi.Any(projectId),
    			WorkspaceName:  pulumi.Any(example.InstanceName),
    			ConnectionName: pulumi.String("https_connection_tf_new"),
    			Type:           pulumi.String("Https"),
    			Url:            pulumi.String("https://example.com"),
    			Headers: pulumi.StringMap{
    				"key1": pulumi.String("value1"),
    				"key2": pulumi.String("value2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var example_https = new Mongodbatlas.StreamConnection("example-https", new()
        {
            ProjectId = projectId,
            WorkspaceName = example.InstanceName,
            ConnectionName = "https_connection_tf_new",
            Type = "Https",
            Url = "https://example.com",
            Headers = 
            {
                { "key1", "value1" },
                { "key2", "value2" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.StreamConnection;
    import com.pulumi.mongodbatlas.StreamConnectionArgs;
    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 example_https = new StreamConnection("example-https", StreamConnectionArgs.builder()
                .projectId(projectId)
                .workspaceName(example.instanceName())
                .connectionName("https_connection_tf_new")
                .type("Https")
                .url("https://example.com")
                .headers(Map.ofEntries(
                    Map.entry("key1", "value1"),
                    Map.entry("key2", "value2")
                ))
                .build());
    
        }
    }
    
    resources:
      example-https:
        type: mongodbatlas:StreamConnection
        properties:
          projectId: ${projectId}
          workspaceName: ${example.instanceName}
          connectionName: https_connection_tf_new
          type: Https
          url: https://example.com
          headers:
            key1: value1
            key2: value2
    

    Create StreamConnection Resource

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

    Constructor syntax

    new StreamConnection(name: string, args: StreamConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def StreamConnection(resource_name: str,
                         args: StreamConnectionArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def StreamConnection(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         connection_name: Optional[str] = None,
                         type: Optional[str] = None,
                         project_id: Optional[str] = None,
                         headers: Optional[Mapping[str, str]] = None,
                         cluster_project_id: Optional[str] = None,
                         config: Optional[Mapping[str, str]] = None,
                         cluster_name: Optional[str] = None,
                         db_role_to_execute: Optional[StreamConnectionDbRoleToExecuteArgs] = None,
                         authentication: Optional[StreamConnectionAuthenticationArgs] = None,
                         instance_name: Optional[str] = None,
                         networking: Optional[StreamConnectionNetworkingArgs] = None,
                         bootstrap_servers: Optional[str] = None,
                         security: Optional[StreamConnectionSecurityArgs] = None,
                         aws: Optional[StreamConnectionAwsArgs] = None,
                         url: Optional[str] = None,
                         workspace_name: Optional[str] = None)
    func NewStreamConnection(ctx *Context, name string, args StreamConnectionArgs, opts ...ResourceOption) (*StreamConnection, error)
    public StreamConnection(string name, StreamConnectionArgs args, CustomResourceOptions? opts = null)
    public StreamConnection(String name, StreamConnectionArgs args)
    public StreamConnection(String name, StreamConnectionArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:StreamConnection
    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 StreamConnectionArgs
    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 StreamConnectionArgs
    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 StreamConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StreamConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StreamConnectionArgs
    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 streamConnectionResource = new Mongodbatlas.StreamConnection("streamConnectionResource", new()
    {
        ConnectionName = "string",
        Type = "string",
        ProjectId = "string",
        Headers = 
        {
            { "string", "string" },
        },
        ClusterProjectId = "string",
        Config = 
        {
            { "string", "string" },
        },
        ClusterName = "string",
        DbRoleToExecute = new Mongodbatlas.Inputs.StreamConnectionDbRoleToExecuteArgs
        {
            Role = "string",
            Type = "string",
        },
        Authentication = new Mongodbatlas.Inputs.StreamConnectionAuthenticationArgs
        {
            ClientId = "string",
            ClientSecret = "string",
            Mechanism = "string",
            Method = "string",
            Password = "string",
            SaslOauthbearerExtensions = "string",
            Scope = "string",
            TokenEndpointUrl = "string",
            Username = "string",
        },
        Networking = new Mongodbatlas.Inputs.StreamConnectionNetworkingArgs
        {
            Access = new Mongodbatlas.Inputs.StreamConnectionNetworkingAccessArgs
            {
                Type = "string",
                ConnectionId = "string",
            },
        },
        BootstrapServers = "string",
        Security = new Mongodbatlas.Inputs.StreamConnectionSecurityArgs
        {
            BrokerPublicCertificate = "string",
            Protocol = "string",
        },
        Aws = new Mongodbatlas.Inputs.StreamConnectionAwsArgs
        {
            RoleArn = "string",
        },
        Url = "string",
        WorkspaceName = "string",
    });
    
    example, err := mongodbatlas.NewStreamConnection(ctx, "streamConnectionResource", &mongodbatlas.StreamConnectionArgs{
    	ConnectionName: pulumi.String("string"),
    	Type:           pulumi.String("string"),
    	ProjectId:      pulumi.String("string"),
    	Headers: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ClusterProjectId: pulumi.String("string"),
    	Config: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ClusterName: pulumi.String("string"),
    	DbRoleToExecute: &mongodbatlas.StreamConnectionDbRoleToExecuteArgs{
    		Role: pulumi.String("string"),
    		Type: pulumi.String("string"),
    	},
    	Authentication: &mongodbatlas.StreamConnectionAuthenticationArgs{
    		ClientId:                  pulumi.String("string"),
    		ClientSecret:              pulumi.String("string"),
    		Mechanism:                 pulumi.String("string"),
    		Method:                    pulumi.String("string"),
    		Password:                  pulumi.String("string"),
    		SaslOauthbearerExtensions: pulumi.String("string"),
    		Scope:                     pulumi.String("string"),
    		TokenEndpointUrl:          pulumi.String("string"),
    		Username:                  pulumi.String("string"),
    	},
    	Networking: &mongodbatlas.StreamConnectionNetworkingArgs{
    		Access: &mongodbatlas.StreamConnectionNetworkingAccessArgs{
    			Type:         pulumi.String("string"),
    			ConnectionId: pulumi.String("string"),
    		},
    	},
    	BootstrapServers: pulumi.String("string"),
    	Security: &mongodbatlas.StreamConnectionSecurityArgs{
    		BrokerPublicCertificate: pulumi.String("string"),
    		Protocol:                pulumi.String("string"),
    	},
    	Aws: &mongodbatlas.StreamConnectionAwsArgs{
    		RoleArn: pulumi.String("string"),
    	},
    	Url:           pulumi.String("string"),
    	WorkspaceName: pulumi.String("string"),
    })
    
    var streamConnectionResource = new StreamConnection("streamConnectionResource", StreamConnectionArgs.builder()
        .connectionName("string")
        .type("string")
        .projectId("string")
        .headers(Map.of("string", "string"))
        .clusterProjectId("string")
        .config(Map.of("string", "string"))
        .clusterName("string")
        .dbRoleToExecute(StreamConnectionDbRoleToExecuteArgs.builder()
            .role("string")
            .type("string")
            .build())
        .authentication(StreamConnectionAuthenticationArgs.builder()
            .clientId("string")
            .clientSecret("string")
            .mechanism("string")
            .method("string")
            .password("string")
            .saslOauthbearerExtensions("string")
            .scope("string")
            .tokenEndpointUrl("string")
            .username("string")
            .build())
        .networking(StreamConnectionNetworkingArgs.builder()
            .access(StreamConnectionNetworkingAccessArgs.builder()
                .type("string")
                .connectionId("string")
                .build())
            .build())
        .bootstrapServers("string")
        .security(StreamConnectionSecurityArgs.builder()
            .brokerPublicCertificate("string")
            .protocol("string")
            .build())
        .aws(StreamConnectionAwsArgs.builder()
            .roleArn("string")
            .build())
        .url("string")
        .workspaceName("string")
        .build());
    
    stream_connection_resource = mongodbatlas.StreamConnection("streamConnectionResource",
        connection_name="string",
        type="string",
        project_id="string",
        headers={
            "string": "string",
        },
        cluster_project_id="string",
        config={
            "string": "string",
        },
        cluster_name="string",
        db_role_to_execute={
            "role": "string",
            "type": "string",
        },
        authentication={
            "client_id": "string",
            "client_secret": "string",
            "mechanism": "string",
            "method": "string",
            "password": "string",
            "sasl_oauthbearer_extensions": "string",
            "scope": "string",
            "token_endpoint_url": "string",
            "username": "string",
        },
        networking={
            "access": {
                "type": "string",
                "connection_id": "string",
            },
        },
        bootstrap_servers="string",
        security={
            "broker_public_certificate": "string",
            "protocol": "string",
        },
        aws={
            "role_arn": "string",
        },
        url="string",
        workspace_name="string")
    
    const streamConnectionResource = new mongodbatlas.StreamConnection("streamConnectionResource", {
        connectionName: "string",
        type: "string",
        projectId: "string",
        headers: {
            string: "string",
        },
        clusterProjectId: "string",
        config: {
            string: "string",
        },
        clusterName: "string",
        dbRoleToExecute: {
            role: "string",
            type: "string",
        },
        authentication: {
            clientId: "string",
            clientSecret: "string",
            mechanism: "string",
            method: "string",
            password: "string",
            saslOauthbearerExtensions: "string",
            scope: "string",
            tokenEndpointUrl: "string",
            username: "string",
        },
        networking: {
            access: {
                type: "string",
                connectionId: "string",
            },
        },
        bootstrapServers: "string",
        security: {
            brokerPublicCertificate: "string",
            protocol: "string",
        },
        aws: {
            roleArn: "string",
        },
        url: "string",
        workspaceName: "string",
    });
    
    type: mongodbatlas:StreamConnection
    properties:
        authentication:
            clientId: string
            clientSecret: string
            mechanism: string
            method: string
            password: string
            saslOauthbearerExtensions: string
            scope: string
            tokenEndpointUrl: string
            username: string
        aws:
            roleArn: string
        bootstrapServers: string
        clusterName: string
        clusterProjectId: string
        config:
            string: string
        connectionName: string
        dbRoleToExecute:
            role: string
            type: string
        headers:
            string: string
        networking:
            access:
                connectionId: string
                type: string
        projectId: string
        security:
            brokerPublicCertificate: string
            protocol: string
        type: string
        url: string
        workspaceName: string
    

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

    ConnectionName string
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    Authentication StreamConnectionAuthentication
    Aws StreamConnectionAws
    BootstrapServers string
    ClusterName string
    ClusterProjectId string
    Config Dictionary<string, string>
    DbRoleToExecute StreamConnectionDbRoleToExecute
    Headers Dictionary<string, string>
    InstanceName string
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    Networking StreamConnectionNetworking
    Security StreamConnectionSecurity
    Url string
    WorkspaceName string
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    ConnectionName string
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    Authentication StreamConnectionAuthenticationArgs
    Aws StreamConnectionAwsArgs
    BootstrapServers string
    ClusterName string
    ClusterProjectId string
    Config map[string]string
    DbRoleToExecute StreamConnectionDbRoleToExecuteArgs
    Headers map[string]string
    InstanceName string
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    Networking StreamConnectionNetworkingArgs
    Security StreamConnectionSecurityArgs
    Url string
    WorkspaceName string
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    connectionName String
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    type String

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    authentication StreamConnectionAuthentication
    aws StreamConnectionAws
    bootstrapServers String
    clusterName String
    clusterProjectId String
    config Map<String,String>
    dbRoleToExecute StreamConnectionDbRoleToExecute
    headers Map<String,String>
    instanceName String
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking StreamConnectionNetworking
    security StreamConnectionSecurity
    url String
    workspaceName String
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    connectionName string
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    projectId string
    Unique 24-hexadecimal digit string that identifies your project.
    type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    authentication StreamConnectionAuthentication
    aws StreamConnectionAws
    bootstrapServers string
    clusterName string
    clusterProjectId string
    config {[key: string]: string}
    dbRoleToExecute StreamConnectionDbRoleToExecute
    headers {[key: string]: string}
    instanceName string
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking StreamConnectionNetworking
    security StreamConnectionSecurity
    url string
    workspaceName string
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    connection_name str
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    project_id str
    Unique 24-hexadecimal digit string that identifies your project.
    type str

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    authentication StreamConnectionAuthenticationArgs
    aws StreamConnectionAwsArgs
    bootstrap_servers str
    cluster_name str
    cluster_project_id str
    config Mapping[str, str]
    db_role_to_execute StreamConnectionDbRoleToExecuteArgs
    headers Mapping[str, str]
    instance_name str
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking StreamConnectionNetworkingArgs
    security StreamConnectionSecurityArgs
    url str
    workspace_name str
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    connectionName String
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    type String

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    authentication Property Map
    aws Property Map
    bootstrapServers String
    clusterName String
    clusterProjectId String
    config Map<String>
    dbRoleToExecute Property Map
    headers Map<String>
    instanceName String
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking Property Map
    security Property Map
    url String
    workspaceName String
    Label that identifies the stream processing workspace. Conflicts with instance_name.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing StreamConnection Resource

    Get an existing StreamConnection 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?: StreamConnectionState, opts?: CustomResourceOptions): StreamConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authentication: Optional[StreamConnectionAuthenticationArgs] = None,
            aws: Optional[StreamConnectionAwsArgs] = None,
            bootstrap_servers: Optional[str] = None,
            cluster_name: Optional[str] = None,
            cluster_project_id: Optional[str] = None,
            config: Optional[Mapping[str, str]] = None,
            connection_name: Optional[str] = None,
            db_role_to_execute: Optional[StreamConnectionDbRoleToExecuteArgs] = None,
            headers: Optional[Mapping[str, str]] = None,
            instance_name: Optional[str] = None,
            networking: Optional[StreamConnectionNetworkingArgs] = None,
            project_id: Optional[str] = None,
            security: Optional[StreamConnectionSecurityArgs] = None,
            type: Optional[str] = None,
            url: Optional[str] = None,
            workspace_name: Optional[str] = None) -> StreamConnection
    func GetStreamConnection(ctx *Context, name string, id IDInput, state *StreamConnectionState, opts ...ResourceOption) (*StreamConnection, error)
    public static StreamConnection Get(string name, Input<string> id, StreamConnectionState? state, CustomResourceOptions? opts = null)
    public static StreamConnection get(String name, Output<String> id, StreamConnectionState state, CustomResourceOptions options)
    resources:  _:    type: mongodbatlas:StreamConnection    get:      id: ${id}
    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:
    Authentication StreamConnectionAuthentication
    Aws StreamConnectionAws
    BootstrapServers string
    ClusterName string
    ClusterProjectId string
    Config Dictionary<string, string>
    ConnectionName string
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    DbRoleToExecute StreamConnectionDbRoleToExecute
    Headers Dictionary<string, string>
    InstanceName string
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    Networking StreamConnectionNetworking
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Security StreamConnectionSecurity
    Type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    Url string
    WorkspaceName string
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    Authentication StreamConnectionAuthenticationArgs
    Aws StreamConnectionAwsArgs
    BootstrapServers string
    ClusterName string
    ClusterProjectId string
    Config map[string]string
    ConnectionName string
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    DbRoleToExecute StreamConnectionDbRoleToExecuteArgs
    Headers map[string]string
    InstanceName string
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    Networking StreamConnectionNetworkingArgs
    ProjectId string
    Unique 24-hexadecimal digit string that identifies your project.
    Security StreamConnectionSecurityArgs
    Type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    Url string
    WorkspaceName string
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    authentication StreamConnectionAuthentication
    aws StreamConnectionAws
    bootstrapServers String
    clusterName String
    clusterProjectId String
    config Map<String,String>
    connectionName String
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    dbRoleToExecute StreamConnectionDbRoleToExecute
    headers Map<String,String>
    instanceName String
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking StreamConnectionNetworking
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    security StreamConnectionSecurity
    type String

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    url String
    workspaceName String
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    authentication StreamConnectionAuthentication
    aws StreamConnectionAws
    bootstrapServers string
    clusterName string
    clusterProjectId string
    config {[key: string]: string}
    connectionName string
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    dbRoleToExecute StreamConnectionDbRoleToExecute
    headers {[key: string]: string}
    instanceName string
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking StreamConnectionNetworking
    projectId string
    Unique 24-hexadecimal digit string that identifies your project.
    security StreamConnectionSecurity
    type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    url string
    workspaceName string
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    authentication StreamConnectionAuthenticationArgs
    aws StreamConnectionAwsArgs
    bootstrap_servers str
    cluster_name str
    cluster_project_id str
    config Mapping[str, str]
    connection_name str
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    db_role_to_execute StreamConnectionDbRoleToExecuteArgs
    headers Mapping[str, str]
    instance_name str
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking StreamConnectionNetworkingArgs
    project_id str
    Unique 24-hexadecimal digit string that identifies your project.
    security StreamConnectionSecurityArgs
    type str

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    url str
    workspace_name str
    Label that identifies the stream processing workspace. Conflicts with instance_name.
    authentication Property Map
    aws Property Map
    bootstrapServers String
    clusterName String
    clusterProjectId String
    config Map<String>
    connectionName String
    Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
    dbRoleToExecute Property Map
    headers Map<String>
    instanceName String
    Label that identifies the stream processing workspace. Attribute is deprecated and will be removed in following major versions in favor of workspace_name.

    Deprecated: This parameter is deprecated. Please transition to workspace_name.

    networking Property Map
    projectId String
    Unique 24-hexadecimal digit string that identifies your project.
    security Property Map
    type String

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    url String
    workspaceName String
    Label that identifies the stream processing workspace. Conflicts with instance_name.

    Supporting Types

    StreamConnectionAuthentication, StreamConnectionAuthenticationArgs

    ClientId string
    Public identifier for the Kafka client.
    ClientSecret string
    Secret known only to the Kafka client and the authorization server.
    Mechanism string
    Method of authentication. Value can be PLAIN, SCRAM-256, or SCRAM-512.
    Method string
    SASL OAUTHBEARER authentication method. Value must be OIDC.
    Password string
    Password of the account to connect to the Kafka cluster.
    SaslOauthbearerExtensions string
    Additional information to provide to the Kafka broker.
    Scope string
    Scope of the access request to the broker specified by the Kafka clients.
    TokenEndpointUrl string
    OAUTH issuer (IdP provider) token endpoint HTTP(S) URI used to retrieve the token.
    Username string
    Username of the account to connect to the Kafka cluster.
    ClientId string
    Public identifier for the Kafka client.
    ClientSecret string
    Secret known only to the Kafka client and the authorization server.
    Mechanism string
    Method of authentication. Value can be PLAIN, SCRAM-256, or SCRAM-512.
    Method string
    SASL OAUTHBEARER authentication method. Value must be OIDC.
    Password string
    Password of the account to connect to the Kafka cluster.
    SaslOauthbearerExtensions string
    Additional information to provide to the Kafka broker.
    Scope string
    Scope of the access request to the broker specified by the Kafka clients.
    TokenEndpointUrl string
    OAUTH issuer (IdP provider) token endpoint HTTP(S) URI used to retrieve the token.
    Username string
    Username of the account to connect to the Kafka cluster.
    clientId String
    Public identifier for the Kafka client.
    clientSecret String
    Secret known only to the Kafka client and the authorization server.
    mechanism String
    Method of authentication. Value can be PLAIN, SCRAM-256, or SCRAM-512.
    method String
    SASL OAUTHBEARER authentication method. Value must be OIDC.
    password String
    Password of the account to connect to the Kafka cluster.
    saslOauthbearerExtensions String
    Additional information to provide to the Kafka broker.
    scope String
    Scope of the access request to the broker specified by the Kafka clients.
    tokenEndpointUrl String
    OAUTH issuer (IdP provider) token endpoint HTTP(S) URI used to retrieve the token.
    username String
    Username of the account to connect to the Kafka cluster.
    clientId string
    Public identifier for the Kafka client.
    clientSecret string
    Secret known only to the Kafka client and the authorization server.
    mechanism string
    Method of authentication. Value can be PLAIN, SCRAM-256, or SCRAM-512.
    method string
    SASL OAUTHBEARER authentication method. Value must be OIDC.
    password string
    Password of the account to connect to the Kafka cluster.
    saslOauthbearerExtensions string
    Additional information to provide to the Kafka broker.
    scope string
    Scope of the access request to the broker specified by the Kafka clients.
    tokenEndpointUrl string
    OAUTH issuer (IdP provider) token endpoint HTTP(S) URI used to retrieve the token.
    username string
    Username of the account to connect to the Kafka cluster.
    client_id str
    Public identifier for the Kafka client.
    client_secret str
    Secret known only to the Kafka client and the authorization server.
    mechanism str
    Method of authentication. Value can be PLAIN, SCRAM-256, or SCRAM-512.
    method str
    SASL OAUTHBEARER authentication method. Value must be OIDC.
    password str
    Password of the account to connect to the Kafka cluster.
    sasl_oauthbearer_extensions str
    Additional information to provide to the Kafka broker.
    scope str
    Scope of the access request to the broker specified by the Kafka clients.
    token_endpoint_url str
    OAUTH issuer (IdP provider) token endpoint HTTP(S) URI used to retrieve the token.
    username str
    Username of the account to connect to the Kafka cluster.
    clientId String
    Public identifier for the Kafka client.
    clientSecret String
    Secret known only to the Kafka client and the authorization server.
    mechanism String
    Method of authentication. Value can be PLAIN, SCRAM-256, or SCRAM-512.
    method String
    SASL OAUTHBEARER authentication method. Value must be OIDC.
    password String
    Password of the account to connect to the Kafka cluster.
    saslOauthbearerExtensions String
    Additional information to provide to the Kafka broker.
    scope String
    Scope of the access request to the broker specified by the Kafka clients.
    tokenEndpointUrl String
    OAUTH issuer (IdP provider) token endpoint HTTP(S) URI used to retrieve the token.
    username String
    Username of the account to connect to the Kafka cluster.

    StreamConnectionAws, StreamConnectionAwsArgs

    RoleArn string
    Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.
    RoleArn string
    Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.
    roleArn String
    Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.
    roleArn string
    Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.
    role_arn str
    Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.
    roleArn String
    Amazon Resource Name (ARN) that identifies the Amazon Web Services (AWS) Identity and Access Management (IAM) role that MongoDB Cloud assumes when it accesses resources in your AWS account.

    StreamConnectionDbRoleToExecute, StreamConnectionDbRoleToExecuteArgs

    Role string
    The name of the role to use. Value can be atlasAdmin, readWriteAnyDatabase, or readAnyDatabase if type is set to BUILT_IN, or the name of a user-defined role if type is set to CUSTOM.
    Type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    Role string
    The name of the role to use. Value can be atlasAdmin, readWriteAnyDatabase, or readAnyDatabase if type is set to BUILT_IN, or the name of a user-defined role if type is set to CUSTOM.
    Type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    role String
    The name of the role to use. Value can be atlasAdmin, readWriteAnyDatabase, or readAnyDatabase if type is set to BUILT_IN, or the name of a user-defined role if type is set to CUSTOM.
    type String

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    role string
    The name of the role to use. Value can be atlasAdmin, readWriteAnyDatabase, or readAnyDatabase if type is set to BUILT_IN, or the name of a user-defined role if type is set to CUSTOM.
    type string

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    role str
    The name of the role to use. Value can be atlasAdmin, readWriteAnyDatabase, or readAnyDatabase if type is set to BUILT_IN, or the name of a user-defined role if type is set to CUSTOM.
    type str

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    role String
    The name of the role to use. Value can be atlasAdmin, readWriteAnyDatabase, or readAnyDatabase if type is set to BUILT_IN, or the name of a user-defined role if type is set to CUSTOM.
    type String

    Type of connection. Can be AWSLambda, Cluster, Https, Kafka or Sample.

    NOTE: Either workspace_name or instance_name must be provided, but not both. These fields are functionally identical and workspace_name is an alias for instance_name. workspace_name should be used instead of instance_name.

    StreamConnectionNetworking, StreamConnectionNetworkingArgs

    Access StreamConnectionNetworkingAccess
    Information about the networking access. See access.
    Access StreamConnectionNetworkingAccess
    Information about the networking access. See access.
    access StreamConnectionNetworkingAccess
    Information about the networking access. See access.
    access StreamConnectionNetworkingAccess
    Information about the networking access. See access.
    access StreamConnectionNetworkingAccess
    Information about the networking access. See access.
    access Property Map
    Information about the networking access. See access.

    StreamConnectionNetworkingAccess, StreamConnectionNetworkingAccessArgs

    Type string
    Selected networking type. Either PUBLIC, VPC or PRIVATE_LINK. Defaults to PUBLIC.
    ConnectionId string
    Id of the Private Link connection when type is PRIVATE_LINK.
    Type string
    Selected networking type. Either PUBLIC, VPC or PRIVATE_LINK. Defaults to PUBLIC.
    ConnectionId string
    Id of the Private Link connection when type is PRIVATE_LINK.
    type String
    Selected networking type. Either PUBLIC, VPC or PRIVATE_LINK. Defaults to PUBLIC.
    connectionId String
    Id of the Private Link connection when type is PRIVATE_LINK.
    type string
    Selected networking type. Either PUBLIC, VPC or PRIVATE_LINK. Defaults to PUBLIC.
    connectionId string
    Id of the Private Link connection when type is PRIVATE_LINK.
    type str
    Selected networking type. Either PUBLIC, VPC or PRIVATE_LINK. Defaults to PUBLIC.
    connection_id str
    Id of the Private Link connection when type is PRIVATE_LINK.
    type String
    Selected networking type. Either PUBLIC, VPC or PRIVATE_LINK. Defaults to PUBLIC.
    connectionId String
    Id of the Private Link connection when type is PRIVATE_LINK.

    StreamConnectionSecurity, StreamConnectionSecurityArgs

    BrokerPublicCertificate string
    A trusted, public x509 certificate for connecting to Kafka over SSL. String value of the certificate must be defined in the attribute.
    Protocol string
    Describes the transport type. Can be either SASL_PLAINTEXT or SASL_SSL.
    BrokerPublicCertificate string
    A trusted, public x509 certificate for connecting to Kafka over SSL. String value of the certificate must be defined in the attribute.
    Protocol string
    Describes the transport type. Can be either SASL_PLAINTEXT or SASL_SSL.
    brokerPublicCertificate String
    A trusted, public x509 certificate for connecting to Kafka over SSL. String value of the certificate must be defined in the attribute.
    protocol String
    Describes the transport type. Can be either SASL_PLAINTEXT or SASL_SSL.
    brokerPublicCertificate string
    A trusted, public x509 certificate for connecting to Kafka over SSL. String value of the certificate must be defined in the attribute.
    protocol string
    Describes the transport type. Can be either SASL_PLAINTEXT or SASL_SSL.
    broker_public_certificate str
    A trusted, public x509 certificate for connecting to Kafka over SSL. String value of the certificate must be defined in the attribute.
    protocol str
    Describes the transport type. Can be either SASL_PLAINTEXT or SASL_SSL.
    brokerPublicCertificate String
    A trusted, public x509 certificate for connecting to Kafka over SSL. String value of the certificate must be defined in the attribute.
    protocol String
    Describes the transport type. Can be either SASL_PLAINTEXT or SASL_SSL.

    Import

    You can import a stream connection resource using the workspace name, project ID, and connection name. The format must be WORKSPACE_NAME-PROJECT_ID-CONNECTION_NAME. For example:

    $ pulumi import mongodbatlas:index/streamConnection:StreamConnection test "DefaultInstance-12251446ae5f3f6ec7968b13-NewConnection"
    

    To learn more, see: MongoDB Atlas API - Stream Connection Documentation. The Terraform Provider Examples Section also contains details on the overall support for Atlas Streams Processing in Terraform.

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

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v4.0.0 published on Tuesday, Dec 30, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate