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,
workspaceName: example.workspaceName,
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,
workspace_name=example["workspaceName"],
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),
WorkspaceName: pulumi.Any(example.WorkspaceName),
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,
WorkspaceName = example.WorkspaceName,
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)
.workspaceName(example.workspaceName())
.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}
workspaceName: ${example.workspaceName}
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.workspaceName,
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["workspaceName"],
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.WorkspaceName),
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.WorkspaceName,
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.workspaceName())
.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.workspaceName}
connectionName: https_connection_tf_new
type: Https
url: https://example.com
headers:
key1: value1
key2: value2
Example Schema Registry Connection with USER_INFO Authentication
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const example_schema_registry = new mongodbatlas.StreamConnection("example-schema-registry", {
projectId: projectId,
workspaceName: example.workspaceName,
connectionName: "SchemaRegistryConnection",
type: "SchemaRegistry",
schemaRegistryProvider: "CONFLUENT",
schemaRegistryUrls: ["https://schema-registry.example.com:8081"],
schemaRegistryAuthentication: {
type: "USER_INFO",
username: "registry-user",
password: schemaRegistryPassword,
},
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
example_schema_registry = mongodbatlas.StreamConnection("example-schema-registry",
project_id=project_id,
workspace_name=example["workspaceName"],
connection_name="SchemaRegistryConnection",
type="SchemaRegistry",
schema_registry_provider="CONFLUENT",
schema_registry_urls=["https://schema-registry.example.com:8081"],
schema_registry_authentication={
"type": "USER_INFO",
"username": "registry-user",
"password": schema_registry_password,
})
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-schema-registry", &mongodbatlas.StreamConnectionArgs{
ProjectId: pulumi.Any(projectId),
WorkspaceName: pulumi.Any(example.WorkspaceName),
ConnectionName: pulumi.String("SchemaRegistryConnection"),
Type: pulumi.String("SchemaRegistry"),
SchemaRegistryProvider: pulumi.String("CONFLUENT"),
SchemaRegistryUrls: pulumi.StringArray{
pulumi.String("https://schema-registry.example.com:8081"),
},
SchemaRegistryAuthentication: &mongodbatlas.StreamConnectionSchemaRegistryAuthenticationArgs{
Type: pulumi.String("USER_INFO"),
Username: pulumi.String("registry-user"),
Password: pulumi.Any(schemaRegistryPassword),
},
})
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_schema_registry = new Mongodbatlas.StreamConnection("example-schema-registry", new()
{
ProjectId = projectId,
WorkspaceName = example.WorkspaceName,
ConnectionName = "SchemaRegistryConnection",
Type = "SchemaRegistry",
SchemaRegistryProvider = "CONFLUENT",
SchemaRegistryUrls = new[]
{
"https://schema-registry.example.com:8081",
},
SchemaRegistryAuthentication = new Mongodbatlas.Inputs.StreamConnectionSchemaRegistryAuthenticationArgs
{
Type = "USER_INFO",
Username = "registry-user",
Password = schemaRegistryPassword,
},
});
});
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.StreamConnectionSchemaRegistryAuthenticationArgs;
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_schema_registry = new StreamConnection("example-schema-registry", StreamConnectionArgs.builder()
.projectId(projectId)
.workspaceName(example.workspaceName())
.connectionName("SchemaRegistryConnection")
.type("SchemaRegistry")
.schemaRegistryProvider("CONFLUENT")
.schemaRegistryUrls("https://schema-registry.example.com:8081")
.schemaRegistryAuthentication(StreamConnectionSchemaRegistryAuthenticationArgs.builder()
.type("USER_INFO")
.username("registry-user")
.password(schemaRegistryPassword)
.build())
.build());
}
}
resources:
example-schema-registry:
type: mongodbatlas:StreamConnection
properties:
projectId: ${projectId}
workspaceName: ${example.workspaceName}
connectionName: SchemaRegistryConnection
type: SchemaRegistry
schemaRegistryProvider: CONFLUENT
schemaRegistryUrls:
- https://schema-registry.example.com:8081
schemaRegistryAuthentication:
type: USER_INFO
username: registry-user
password: ${schemaRegistryPassword}
Example Schema Registry Connection with SASL_INHERIT Authentication
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const example_schema_registry_sasl = new mongodbatlas.StreamConnection("example-schema-registry-sasl", {
projectId: projectId,
workspaceName: example.workspaceName,
connectionName: "SchemaRegistryConnectionSASL",
type: "SchemaRegistry",
schemaRegistryProvider: "CONFLUENT",
schemaRegistryUrls: ["https://schema-registry.example.com:8081"],
schemaRegistryAuthentication: {
type: "SASL_INHERIT",
},
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
example_schema_registry_sasl = mongodbatlas.StreamConnection("example-schema-registry-sasl",
project_id=project_id,
workspace_name=example["workspaceName"],
connection_name="SchemaRegistryConnectionSASL",
type="SchemaRegistry",
schema_registry_provider="CONFLUENT",
schema_registry_urls=["https://schema-registry.example.com:8081"],
schema_registry_authentication={
"type": "SASL_INHERIT",
})
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-schema-registry-sasl", &mongodbatlas.StreamConnectionArgs{
ProjectId: pulumi.Any(projectId),
WorkspaceName: pulumi.Any(example.WorkspaceName),
ConnectionName: pulumi.String("SchemaRegistryConnectionSASL"),
Type: pulumi.String("SchemaRegistry"),
SchemaRegistryProvider: pulumi.String("CONFLUENT"),
SchemaRegistryUrls: pulumi.StringArray{
pulumi.String("https://schema-registry.example.com:8081"),
},
SchemaRegistryAuthentication: &mongodbatlas.StreamConnectionSchemaRegistryAuthenticationArgs{
Type: pulumi.String("SASL_INHERIT"),
},
})
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_schema_registry_sasl = new Mongodbatlas.StreamConnection("example-schema-registry-sasl", new()
{
ProjectId = projectId,
WorkspaceName = example.WorkspaceName,
ConnectionName = "SchemaRegistryConnectionSASL",
Type = "SchemaRegistry",
SchemaRegistryProvider = "CONFLUENT",
SchemaRegistryUrls = new[]
{
"https://schema-registry.example.com:8081",
},
SchemaRegistryAuthentication = new Mongodbatlas.Inputs.StreamConnectionSchemaRegistryAuthenticationArgs
{
Type = "SASL_INHERIT",
},
});
});
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.StreamConnectionSchemaRegistryAuthenticationArgs;
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_schema_registry_sasl = new StreamConnection("example-schema-registry-sasl", StreamConnectionArgs.builder()
.projectId(projectId)
.workspaceName(example.workspaceName())
.connectionName("SchemaRegistryConnectionSASL")
.type("SchemaRegistry")
.schemaRegistryProvider("CONFLUENT")
.schemaRegistryUrls("https://schema-registry.example.com:8081")
.schemaRegistryAuthentication(StreamConnectionSchemaRegistryAuthenticationArgs.builder()
.type("SASL_INHERIT")
.build())
.build());
}
}
resources:
example-schema-registry-sasl:
type: mongodbatlas:StreamConnection
properties:
projectId: ${projectId}
workspaceName: ${example.workspaceName}
connectionName: SchemaRegistryConnectionSASL
type: SchemaRegistry
schemaRegistryProvider: CONFLUENT
schemaRegistryUrls:
- https://schema-registry.example.com:8081
schemaRegistryAuthentication:
type: SASL_INHERIT
Example Usage with Stream Processor
When using a stream connection with a stream processor, the connection must be fully provisioned before the processor can be created. The provider automatically waits for connections to be ready after creation or updates. The example below shows a typical pattern:
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const example = new mongodbatlas.StreamWorkspace("example", {
projectId: projectId,
workspaceName: "ExampleWorkspace",
dataProcessRegion: {
region: "VIRGINIA_USA",
cloudProvider: "AWS",
},
});
// Source connection (Sample data)
const source = new mongodbatlas.StreamConnection("source", {
projectId: projectId,
workspaceName: example.workspaceName,
connectionName: "sample_stream_solar",
type: "Sample",
});
// Sink connection (Atlas Cluster)
const sink = new mongodbatlas.StreamConnection("sink", {
projectId: projectId,
workspaceName: example.workspaceName,
connectionName: "ClusterConnection",
type: "Cluster",
clusterName: exampleMongodbatlasCluster.name,
dbRoleToExecute: {
role: "atlasAdmin",
type: "BUILT_IN",
},
});
// Stream processor that depends on both connections
const exampleStreamProcessor = new mongodbatlas.StreamProcessor("example", {
projectId: projectId,
workspaceName: example.workspaceName,
processorName: "ExampleProcessor",
pipeline: pulumi.jsonStringify([
{
$source: {
connectionName: source.connectionName,
},
},
{
$emit: {
connectionName: sink.connectionName,
},
},
]),
state: "STARTED",
});
import pulumi
import json
import pulumi_mongodbatlas as mongodbatlas
example = mongodbatlas.StreamWorkspace("example",
project_id=project_id,
workspace_name="ExampleWorkspace",
data_process_region={
"region": "VIRGINIA_USA",
"cloud_provider": "AWS",
})
# Source connection (Sample data)
source = mongodbatlas.StreamConnection("source",
project_id=project_id,
workspace_name=example.workspace_name,
connection_name="sample_stream_solar",
type="Sample")
# Sink connection (Atlas Cluster)
sink = mongodbatlas.StreamConnection("sink",
project_id=project_id,
workspace_name=example.workspace_name,
connection_name="ClusterConnection",
type="Cluster",
cluster_name=example_mongodbatlas_cluster["name"],
db_role_to_execute={
"role": "atlasAdmin",
"type": "BUILT_IN",
})
# Stream processor that depends on both connections
example_stream_processor = mongodbatlas.StreamProcessor("example",
project_id=project_id,
workspace_name=example.workspace_name,
processor_name="ExampleProcessor",
pipeline=pulumi.Output.json_dumps([
{
"$source": {
"connectionName": source.connection_name,
},
},
{
"$emit": {
"connectionName": sink.connection_name,
},
},
]),
state="STARTED")
package main
import (
"encoding/json"
"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 {
example, err := mongodbatlas.NewStreamWorkspace(ctx, "example", &mongodbatlas.StreamWorkspaceArgs{
ProjectId: pulumi.Any(projectId),
WorkspaceName: pulumi.String("ExampleWorkspace"),
DataProcessRegion: &mongodbatlas.StreamWorkspaceDataProcessRegionArgs{
Region: pulumi.String("VIRGINIA_USA"),
CloudProvider: pulumi.String("AWS"),
},
})
if err != nil {
return err
}
// Source connection (Sample data)
source, err := mongodbatlas.NewStreamConnection(ctx, "source", &mongodbatlas.StreamConnectionArgs{
ProjectId: pulumi.Any(projectId),
WorkspaceName: example.WorkspaceName,
ConnectionName: pulumi.String("sample_stream_solar"),
Type: pulumi.String("Sample"),
})
if err != nil {
return err
}
// Sink connection (Atlas Cluster)
sink, err := mongodbatlas.NewStreamConnection(ctx, "sink", &mongodbatlas.StreamConnectionArgs{
ProjectId: pulumi.Any(projectId),
WorkspaceName: example.WorkspaceName,
ConnectionName: pulumi.String("ClusterConnection"),
Type: pulumi.String("Cluster"),
ClusterName: pulumi.Any(exampleMongodbatlasCluster.Name),
DbRoleToExecute: &mongodbatlas.StreamConnectionDbRoleToExecuteArgs{
Role: pulumi.String("atlasAdmin"),
Type: pulumi.String("BUILT_IN"),
},
})
if err != nil {
return err
}
// Stream processor that depends on both connections
_, err = mongodbatlas.NewStreamProcessor(ctx, "example", &mongodbatlas.StreamProcessorArgs{
ProjectId: pulumi.Any(projectId),
WorkspaceName: example.WorkspaceName,
ProcessorName: pulumi.String("ExampleProcessor"),
Pipeline: pulumi.All(source.ConnectionName, sink.ConnectionName).ApplyT(func(_args []interface{}) (string, error) {
sourceConnectionName := _args[0].(string)
sinkConnectionName := _args[1].(string)
var _zero string
tmpJSON0, err := json.Marshal([]interface{}{
map[string]interface{}{
"$source": map[string]interface{}{
"connectionName": sourceConnectionName,
},
},
map[string]interface{}{
"$emit": map[string]interface{}{
"connectionName": sinkConnectionName,
},
},
})
if err != nil {
return _zero, err
}
json0 := string(tmpJSON0)
return json0, nil
}).(pulumi.StringOutput),
State: pulumi.String("STARTED"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var example = new Mongodbatlas.StreamWorkspace("example", new()
{
ProjectId = projectId,
WorkspaceName = "ExampleWorkspace",
DataProcessRegion = new Mongodbatlas.Inputs.StreamWorkspaceDataProcessRegionArgs
{
Region = "VIRGINIA_USA",
CloudProvider = "AWS",
},
});
// Source connection (Sample data)
var source = new Mongodbatlas.StreamConnection("source", new()
{
ProjectId = projectId,
WorkspaceName = example.WorkspaceName,
ConnectionName = "sample_stream_solar",
Type = "Sample",
});
// Sink connection (Atlas Cluster)
var sink = new Mongodbatlas.StreamConnection("sink", new()
{
ProjectId = projectId,
WorkspaceName = example.WorkspaceName,
ConnectionName = "ClusterConnection",
Type = "Cluster",
ClusterName = exampleMongodbatlasCluster.Name,
DbRoleToExecute = new Mongodbatlas.Inputs.StreamConnectionDbRoleToExecuteArgs
{
Role = "atlasAdmin",
Type = "BUILT_IN",
},
});
// Stream processor that depends on both connections
var exampleStreamProcessor = new Mongodbatlas.StreamProcessor("example", new()
{
ProjectId = projectId,
WorkspaceName = example.WorkspaceName,
ProcessorName = "ExampleProcessor",
Pipeline = Output.JsonSerialize(Output.Create(new[]
{
new Dictionary<string, object?>
{
["$source"] = new Dictionary<string, object?>
{
["connectionName"] = source.ConnectionName,
},
},
new Dictionary<string, object?>
{
["$emit"] = new Dictionary<string, object?>
{
["connectionName"] = sink.ConnectionName,
},
},
})),
State = "STARTED",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.StreamWorkspace;
import com.pulumi.mongodbatlas.StreamWorkspaceArgs;
import com.pulumi.mongodbatlas.inputs.StreamWorkspaceDataProcessRegionArgs;
import com.pulumi.mongodbatlas.StreamConnection;
import com.pulumi.mongodbatlas.StreamConnectionArgs;
import com.pulumi.mongodbatlas.inputs.StreamConnectionDbRoleToExecuteArgs;
import com.pulumi.mongodbatlas.StreamProcessor;
import com.pulumi.mongodbatlas.StreamProcessorArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 = new StreamWorkspace("example", StreamWorkspaceArgs.builder()
.projectId(projectId)
.workspaceName("ExampleWorkspace")
.dataProcessRegion(StreamWorkspaceDataProcessRegionArgs.builder()
.region("VIRGINIA_USA")
.cloudProvider("AWS")
.build())
.build());
// Source connection (Sample data)
var source = new StreamConnection("source", StreamConnectionArgs.builder()
.projectId(projectId)
.workspaceName(example.workspaceName())
.connectionName("sample_stream_solar")
.type("Sample")
.build());
// Sink connection (Atlas Cluster)
var sink = new StreamConnection("sink", StreamConnectionArgs.builder()
.projectId(projectId)
.workspaceName(example.workspaceName())
.connectionName("ClusterConnection")
.type("Cluster")
.clusterName(exampleMongodbatlasCluster.name())
.dbRoleToExecute(StreamConnectionDbRoleToExecuteArgs.builder()
.role("atlasAdmin")
.type("BUILT_IN")
.build())
.build());
// Stream processor that depends on both connections
var exampleStreamProcessor = new StreamProcessor("exampleStreamProcessor", StreamProcessorArgs.builder()
.projectId(projectId)
.workspaceName(example.workspaceName())
.processorName("ExampleProcessor")
.pipeline(Output.tuple(source.connectionName(), sink.connectionName()).applyValue(values -> {
var sourceConnectionName = values.t1;
var sinkConnectionName = values.t2;
return serializeJson(
jsonArray(
jsonObject(
jsonProperty("$source", jsonObject(
jsonProperty("connectionName", sourceConnectionName)
))
),
jsonObject(
jsonProperty("$emit", jsonObject(
jsonProperty("connectionName", sinkConnectionName)
))
)
));
}))
.state("STARTED")
.build());
}
}
resources:
example:
type: mongodbatlas:StreamWorkspace
properties:
projectId: ${projectId}
workspaceName: ExampleWorkspace
dataProcessRegion:
region: VIRGINIA_USA
cloudProvider: AWS
# Source connection (Sample data)
source:
type: mongodbatlas:StreamConnection
properties:
projectId: ${projectId}
workspaceName: ${example.workspaceName}
connectionName: sample_stream_solar
type: Sample
# Sink connection (Atlas Cluster)
sink:
type: mongodbatlas:StreamConnection
properties:
projectId: ${projectId}
workspaceName: ${example.workspaceName}
connectionName: ClusterConnection
type: Cluster
clusterName: ${exampleMongodbatlasCluster.name}
dbRoleToExecute:
role: atlasAdmin
type: BUILT_IN
# Stream processor that depends on both connections
exampleStreamProcessor:
type: mongodbatlas:StreamProcessor
name: example
properties:
projectId: ${projectId}
workspaceName: ${example.workspaceName}
processorName: ExampleProcessor
pipeline:
fn::toJSON:
- $source:
connectionName: ${source.connectionName}
- $emit:
connectionName: ${sink.connectionName}
state: STARTED
NOTE: The stream processor resource automatically depends on the stream connections through the
connection_namereferences in the pipeline. This ensures proper creation order. The provider waits for each connection to be fully provisioned before returning from create or update operations.
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,
networking: Optional[StreamConnectionNetworkingArgs] = None,
schema_registry_authentication: Optional[StreamConnectionSchemaRegistryAuthenticationArgs] = None,
config: Optional[Mapping[str, str]] = None,
cluster_name: Optional[str] = None,
db_role_to_execute: Optional[StreamConnectionDbRoleToExecuteArgs] = None,
headers: Optional[Mapping[str, str]] = None,
instance_name: Optional[str] = None,
authentication: Optional[StreamConnectionAuthenticationArgs] = None,
bootstrap_servers: Optional[str] = None,
cluster_project_id: Optional[str] = None,
schema_registry_provider: Optional[str] = None,
schema_registry_urls: Optional[Sequence[str]] = None,
security: Optional[StreamConnectionSecurityArgs] = None,
timeouts: Optional[StreamConnectionTimeoutsArgs] = 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",
Networking = new Mongodbatlas.Inputs.StreamConnectionNetworkingArgs
{
Access = new Mongodbatlas.Inputs.StreamConnectionNetworkingAccessArgs
{
Type = "string",
ConnectionId = "string",
},
},
SchemaRegistryAuthentication = new Mongodbatlas.Inputs.StreamConnectionSchemaRegistryAuthenticationArgs
{
Password = "string",
Type = "string",
Username = "string",
},
Config =
{
{ "string", "string" },
},
ClusterName = "string",
DbRoleToExecute = new Mongodbatlas.Inputs.StreamConnectionDbRoleToExecuteArgs
{
Role = "string",
Type = "string",
},
Headers =
{
{ "string", "string" },
},
Authentication = new Mongodbatlas.Inputs.StreamConnectionAuthenticationArgs
{
ClientId = "string",
ClientSecret = "string",
Mechanism = "string",
Method = "string",
Password = "string",
SaslOauthbearerExtensions = "string",
Scope = "string",
TokenEndpointUrl = "string",
Username = "string",
},
BootstrapServers = "string",
ClusterProjectId = "string",
SchemaRegistryProvider = "string",
SchemaRegistryUrls = new[]
{
"string",
},
Security = new Mongodbatlas.Inputs.StreamConnectionSecurityArgs
{
BrokerPublicCertificate = "string",
Protocol = "string",
},
Timeouts = new Mongodbatlas.Inputs.StreamConnectionTimeoutsArgs
{
Create = "string",
Update = "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"),
Networking: &mongodbatlas.StreamConnectionNetworkingArgs{
Access: &mongodbatlas.StreamConnectionNetworkingAccessArgs{
Type: pulumi.String("string"),
ConnectionId: pulumi.String("string"),
},
},
SchemaRegistryAuthentication: &mongodbatlas.StreamConnectionSchemaRegistryAuthenticationArgs{
Password: pulumi.String("string"),
Type: pulumi.String("string"),
Username: 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"),
},
Headers: pulumi.StringMap{
"string": 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"),
},
BootstrapServers: pulumi.String("string"),
ClusterProjectId: pulumi.String("string"),
SchemaRegistryProvider: pulumi.String("string"),
SchemaRegistryUrls: pulumi.StringArray{
pulumi.String("string"),
},
Security: &mongodbatlas.StreamConnectionSecurityArgs{
BrokerPublicCertificate: pulumi.String("string"),
Protocol: pulumi.String("string"),
},
Timeouts: &mongodbatlas.StreamConnectionTimeoutsArgs{
Create: pulumi.String("string"),
Update: 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")
.networking(StreamConnectionNetworkingArgs.builder()
.access(StreamConnectionNetworkingAccessArgs.builder()
.type("string")
.connectionId("string")
.build())
.build())
.schemaRegistryAuthentication(StreamConnectionSchemaRegistryAuthenticationArgs.builder()
.password("string")
.type("string")
.username("string")
.build())
.config(Map.of("string", "string"))
.clusterName("string")
.dbRoleToExecute(StreamConnectionDbRoleToExecuteArgs.builder()
.role("string")
.type("string")
.build())
.headers(Map.of("string", "string"))
.authentication(StreamConnectionAuthenticationArgs.builder()
.clientId("string")
.clientSecret("string")
.mechanism("string")
.method("string")
.password("string")
.saslOauthbearerExtensions("string")
.scope("string")
.tokenEndpointUrl("string")
.username("string")
.build())
.bootstrapServers("string")
.clusterProjectId("string")
.schemaRegistryProvider("string")
.schemaRegistryUrls("string")
.security(StreamConnectionSecurityArgs.builder()
.brokerPublicCertificate("string")
.protocol("string")
.build())
.timeouts(StreamConnectionTimeoutsArgs.builder()
.create("string")
.update("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",
networking={
"access": {
"type": "string",
"connection_id": "string",
},
},
schema_registry_authentication={
"password": "string",
"type": "string",
"username": "string",
},
config={
"string": "string",
},
cluster_name="string",
db_role_to_execute={
"role": "string",
"type": "string",
},
headers={
"string": "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",
},
bootstrap_servers="string",
cluster_project_id="string",
schema_registry_provider="string",
schema_registry_urls=["string"],
security={
"broker_public_certificate": "string",
"protocol": "string",
},
timeouts={
"create": "string",
"update": "string",
},
aws={
"role_arn": "string",
},
url="string",
workspace_name="string")
const streamConnectionResource = new mongodbatlas.StreamConnection("streamConnectionResource", {
connectionName: "string",
type: "string",
projectId: "string",
networking: {
access: {
type: "string",
connectionId: "string",
},
},
schemaRegistryAuthentication: {
password: "string",
type: "string",
username: "string",
},
config: {
string: "string",
},
clusterName: "string",
dbRoleToExecute: {
role: "string",
type: "string",
},
headers: {
string: "string",
},
authentication: {
clientId: "string",
clientSecret: "string",
mechanism: "string",
method: "string",
password: "string",
saslOauthbearerExtensions: "string",
scope: "string",
tokenEndpointUrl: "string",
username: "string",
},
bootstrapServers: "string",
clusterProjectId: "string",
schemaRegistryProvider: "string",
schemaRegistryUrls: ["string"],
security: {
brokerPublicCertificate: "string",
protocol: "string",
},
timeouts: {
create: "string",
update: "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
schemaRegistryAuthentication:
password: string
type: string
username: string
schemaRegistryProvider: string
schemaRegistryUrls:
- string
security:
brokerPublicCertificate: string
protocol: string
timeouts:
create: string
update: 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:
- Connection
Name string - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- Type string
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - Authentication
Stream
Connection Authentication - Aws
Stream
Connection Aws - Bootstrap
Servers string - Cluster
Name string - Cluster
Project stringId - Config Dictionary<string, string>
- Db
Role StreamTo Execute Connection Db Role To Execute - Headers Dictionary<string, string>
- Instance
Name string - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - Networking
Stream
Connection Networking - Schema
Registry StreamAuthentication Connection Schema Registry Authentication - Schema
Registry stringProvider - Schema
Registry List<string>Urls - Security
Stream
Connection Security - Timeouts
Stream
Connection Timeouts - Url string
- Workspace
Name string - Label that identifies the stream processing workspace.
- Connection
Name string - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- Type string
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - Authentication
Stream
Connection Authentication Args - Aws
Stream
Connection Aws Args - Bootstrap
Servers string - Cluster
Name string - Cluster
Project stringId - Config map[string]string
- Db
Role StreamTo Execute Connection Db Role To Execute Args - Headers map[string]string
- Instance
Name string - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - Networking
Stream
Connection Networking Args - Schema
Registry StreamAuthentication Connection Schema Registry Authentication Args - Schema
Registry stringProvider - Schema
Registry []stringUrls - Security
Stream
Connection Security Args - Timeouts
Stream
Connection Timeouts Args - Url string
- Workspace
Name string - Label that identifies the stream processing workspace.
- connection
Name String - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project.
- type String
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - authentication
Stream
Connection Authentication - aws
Stream
Connection Aws - bootstrap
Servers String - cluster
Name String - cluster
Project StringId - config Map<String,String>
- db
Role StreamTo Execute Connection Db Role To Execute - headers Map<String,String>
- instance
Name String - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking
Stream
Connection Networking - schema
Registry StreamAuthentication Connection Schema Registry Authentication - schema
Registry StringProvider - schema
Registry List<String>Urls - security
Stream
Connection Security - timeouts
Stream
Connection Timeouts - url String
- workspace
Name String - Label that identifies the stream processing workspace.
- connection
Name string - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- type string
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - authentication
Stream
Connection Authentication - aws
Stream
Connection Aws - bootstrap
Servers string - cluster
Name string - cluster
Project stringId - config {[key: string]: string}
- db
Role StreamTo Execute Connection Db Role To Execute - headers {[key: string]: string}
- instance
Name string - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking
Stream
Connection Networking - schema
Registry StreamAuthentication Connection Schema Registry Authentication - schema
Registry stringProvider - schema
Registry string[]Urls - security
Stream
Connection Security - timeouts
Stream
Connection Timeouts - url string
- workspace
Name string - Label that identifies the stream processing workspace.
- 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,Sample, orSchemaRegistry. - authentication
Stream
Connection Authentication Args - aws
Stream
Connection Aws Args - bootstrap_
servers str - cluster_
name str - cluster_
project_ strid - config Mapping[str, str]
- db_
role_ Streamto_ execute Connection Db Role To Execute Args - headers Mapping[str, str]
- instance_
name str - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking
Stream
Connection Networking Args - schema_
registry_ Streamauthentication Connection Schema Registry Authentication Args - schema_
registry_ strprovider - schema_
registry_ Sequence[str]urls - security
Stream
Connection Security Args - timeouts
Stream
Connection Timeouts Args - url str
- workspace_
name str - Label that identifies the stream processing workspace.
- connection
Name String - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- project
Id String - Unique 24-hexadecimal digit string that identifies your project.
- type String
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - authentication Property Map
- aws Property Map
- bootstrap
Servers String - cluster
Name String - cluster
Project StringId - config Map<String>
- db
Role Property MapTo Execute - headers Map<String>
- instance
Name String - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking Property Map
- schema
Registry Property MapAuthentication - schema
Registry StringProvider - schema
Registry List<String>Urls - security Property Map
- timeouts Property Map
- url String
- workspace
Name String - Label that identifies the stream processing workspace.
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,
schema_registry_authentication: Optional[StreamConnectionSchemaRegistryAuthenticationArgs] = None,
schema_registry_provider: Optional[str] = None,
schema_registry_urls: Optional[Sequence[str]] = None,
security: Optional[StreamConnectionSecurityArgs] = None,
timeouts: Optional[StreamConnectionTimeoutsArgs] = None,
type: Optional[str] = None,
url: Optional[str] = None,
workspace_name: Optional[str] = None) -> StreamConnectionfunc 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.
- Authentication
Stream
Connection Authentication - Aws
Stream
Connection Aws - Bootstrap
Servers string - Cluster
Name string - Cluster
Project stringId - Config Dictionary<string, string>
- Connection
Name string - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- Db
Role StreamTo Execute Connection Db Role To Execute - Headers Dictionary<string, string>
- Instance
Name string - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - Networking
Stream
Connection Networking - Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- Schema
Registry StreamAuthentication Connection Schema Registry Authentication - Schema
Registry stringProvider - Schema
Registry List<string>Urls - Security
Stream
Connection Security - Timeouts
Stream
Connection Timeouts - Type string
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - Url string
- Workspace
Name string - Label that identifies the stream processing workspace.
- Authentication
Stream
Connection Authentication Args - Aws
Stream
Connection Aws Args - Bootstrap
Servers string - Cluster
Name string - Cluster
Project stringId - Config map[string]string
- Connection
Name string - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- Db
Role StreamTo Execute Connection Db Role To Execute Args - Headers map[string]string
- Instance
Name string - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - Networking
Stream
Connection Networking Args - Project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- Schema
Registry StreamAuthentication Connection Schema Registry Authentication Args - Schema
Registry stringProvider - Schema
Registry []stringUrls - Security
Stream
Connection Security Args - Timeouts
Stream
Connection Timeouts Args - Type string
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - Url string
- Workspace
Name string - Label that identifies the stream processing workspace.
- authentication
Stream
Connection Authentication - aws
Stream
Connection Aws - bootstrap
Servers String - cluster
Name String - cluster
Project StringId - config Map<String,String>
- connection
Name String - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- db
Role StreamTo Execute Connection Db Role To Execute - headers Map<String,String>
- instance
Name String - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking
Stream
Connection Networking - project
Id String - Unique 24-hexadecimal digit string that identifies your project.
- schema
Registry StreamAuthentication Connection Schema Registry Authentication - schema
Registry StringProvider - schema
Registry List<String>Urls - security
Stream
Connection Security - timeouts
Stream
Connection Timeouts - type String
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - url String
- workspace
Name String - Label that identifies the stream processing workspace.
- authentication
Stream
Connection Authentication - aws
Stream
Connection Aws - bootstrap
Servers string - cluster
Name string - cluster
Project stringId - config {[key: string]: string}
- connection
Name string - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- db
Role StreamTo Execute Connection Db Role To Execute - headers {[key: string]: string}
- instance
Name string - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking
Stream
Connection Networking - project
Id string - Unique 24-hexadecimal digit string that identifies your project.
- schema
Registry StreamAuthentication Connection Schema Registry Authentication - schema
Registry stringProvider - schema
Registry string[]Urls - security
Stream
Connection Security - timeouts
Stream
Connection Timeouts - type string
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - url string
- workspace
Name string - Label that identifies the stream processing workspace.
- authentication
Stream
Connection Authentication Args - aws
Stream
Connection Aws Args - bootstrap_
servers str - cluster_
name str - cluster_
project_ strid - 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_ Streamto_ execute Connection Db Role To Execute Args - headers Mapping[str, str]
- instance_
name str - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking
Stream
Connection Networking Args - project_
id str - Unique 24-hexadecimal digit string that identifies your project.
- schema_
registry_ Streamauthentication Connection Schema Registry Authentication Args - schema_
registry_ strprovider - schema_
registry_ Sequence[str]urls - security
Stream
Connection Security Args - timeouts
Stream
Connection Timeouts Args - type str
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - url str
- workspace_
name str - Label that identifies the stream processing workspace.
- authentication Property Map
- aws Property Map
- bootstrap
Servers String - cluster
Name String - cluster
Project StringId - config Map<String>
- connection
Name String - Label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
- db
Role Property MapTo Execute - headers Map<String>
- instance
Name String - Label that identifies the stream processing workspace. Use
workspace_nameinstead; this attribute will be removed in a future major version. - networking Property Map
- project
Id String - Unique 24-hexadecimal digit string that identifies your project.
- schema
Registry Property MapAuthentication - schema
Registry StringProvider - schema
Registry List<String>Urls - security Property Map
- timeouts Property Map
- type String
- Type of connection. Can be
AWSLambda,Cluster,Https,Kafka,Sample, orSchemaRegistry. - url String
- workspace
Name String - Label that identifies the stream processing workspace.
Supporting Types
StreamConnectionAuthentication, StreamConnectionAuthenticationArgs
- Client
Id string - Public identifier for the Kafka client.
- Client
Secret string - Secret known only to the Kafka client and the authorization server.
- Mechanism string
- Method of authentication. Value can be
PLAIN,SCRAM-256, orSCRAM-512. - Method string
- SASL OAUTHBEARER authentication method. Value must be OIDC.
- Password string
- Password of the account to connect to the Kafka cluster.
- Sasl
Oauthbearer stringExtensions - Additional information to provide to the Kafka broker.
- Scope string
- Scope of the access request to the broker specified by the Kafka clients.
- Token
Endpoint stringUrl - 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 string - Public identifier for the Kafka client.
- Client
Secret string - Secret known only to the Kafka client and the authorization server.
- Mechanism string
- Method of authentication. Value can be
PLAIN,SCRAM-256, orSCRAM-512. - Method string
- SASL OAUTHBEARER authentication method. Value must be OIDC.
- Password string
- Password of the account to connect to the Kafka cluster.
- Sasl
Oauthbearer stringExtensions - Additional information to provide to the Kafka broker.
- Scope string
- Scope of the access request to the broker specified by the Kafka clients.
- Token
Endpoint stringUrl - 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 String - Public identifier for the Kafka client.
- client
Secret String - Secret known only to the Kafka client and the authorization server.
- mechanism String
- Method of authentication. Value can be
PLAIN,SCRAM-256, orSCRAM-512. - method String
- SASL OAUTHBEARER authentication method. Value must be OIDC.
- password String
- Password of the account to connect to the Kafka cluster.
- sasl
Oauthbearer StringExtensions - Additional information to provide to the Kafka broker.
- scope String
- Scope of the access request to the broker specified by the Kafka clients.
- token
Endpoint StringUrl - 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 string - Public identifier for the Kafka client.
- client
Secret string - Secret known only to the Kafka client and the authorization server.
- mechanism string
- Method of authentication. Value can be
PLAIN,SCRAM-256, orSCRAM-512. - method string
- SASL OAUTHBEARER authentication method. Value must be OIDC.
- password string
- Password of the account to connect to the Kafka cluster.
- sasl
Oauthbearer stringExtensions - Additional information to provide to the Kafka broker.
- scope string
- Scope of the access request to the broker specified by the Kafka clients.
- token
Endpoint stringUrl - 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, orSCRAM-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_ strextensions - 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_ strurl - 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.
- client
Id String - Public identifier for the Kafka client.
- client
Secret String - Secret known only to the Kafka client and the authorization server.
- mechanism String
- Method of authentication. Value can be
PLAIN,SCRAM-256, orSCRAM-512. - method String
- SASL OAUTHBEARER authentication method. Value must be OIDC.
- password String
- Password of the account to connect to the Kafka cluster.
- sasl
Oauthbearer StringExtensions - Additional information to provide to the Kafka broker.
- scope String
- Scope of the access request to the broker specified by the Kafka clients.
- token
Endpoint StringUrl - 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
- Role
Arn 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 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 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 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.
- role
Arn 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
StreamConnectionNetworking, StreamConnectionNetworkingArgs
- Access
Stream
Connection Networking Access - Information about the networking access. See access.
- Access
Stream
Connection Networking Access - Information about the networking access. See access.
- access
Stream
Connection Networking Access - Information about the networking access. See access.
- access
Stream
Connection Networking Access - Information about the networking access. See access.
- access
Stream
Connection Networking Access - 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,VPCorPRIVATE_LINK. Defaults toPUBLIC. - Connection
Id string - Id of the Private Link connection when type is
PRIVATE_LINK.
- Type string
- Selected networking type. Either
PUBLIC,VPCorPRIVATE_LINK. Defaults toPUBLIC. - Connection
Id string - Id of the Private Link connection when type is
PRIVATE_LINK.
- type String
- Selected networking type. Either
PUBLIC,VPCorPRIVATE_LINK. Defaults toPUBLIC. - connection
Id String - Id of the Private Link connection when type is
PRIVATE_LINK.
- type string
- Selected networking type. Either
PUBLIC,VPCorPRIVATE_LINK. Defaults toPUBLIC. - connection
Id string - Id of the Private Link connection when type is
PRIVATE_LINK.
- type str
- Selected networking type. Either
PUBLIC,VPCorPRIVATE_LINK. Defaults toPUBLIC. - connection_
id str - Id of the Private Link connection when type is
PRIVATE_LINK.
- type String
- Selected networking type. Either
PUBLIC,VPCorPRIVATE_LINK. Defaults toPUBLIC. - connection
Id String - Id of the Private Link connection when type is
PRIVATE_LINK.
StreamConnectionSchemaRegistryAuthentication, StreamConnectionSchemaRegistryAuthenticationArgs
- Password string
- Password for the Schema Registry. Required when
typeisUSER_INFO. - Type string
- Authentication type discriminator. Specifies the authentication mechanism for Confluent Schema Registry. Valid values are
USER_INFOorSASL_INHERIT.USER_INFO- Uses username and password authentication for Confluent Schema Registry.SASL_INHERIT- Inherits the authentication configuration from Kafka for the Confluent Schema Registry.
- Username string
- Username for the Schema Registry. Required when
typeisUSER_INFO.
- Password string
- Password for the Schema Registry. Required when
typeisUSER_INFO. - Type string
- Authentication type discriminator. Specifies the authentication mechanism for Confluent Schema Registry. Valid values are
USER_INFOorSASL_INHERIT.USER_INFO- Uses username and password authentication for Confluent Schema Registry.SASL_INHERIT- Inherits the authentication configuration from Kafka for the Confluent Schema Registry.
- Username string
- Username for the Schema Registry. Required when
typeisUSER_INFO.
- password String
- Password for the Schema Registry. Required when
typeisUSER_INFO. - type String
- Authentication type discriminator. Specifies the authentication mechanism for Confluent Schema Registry. Valid values are
USER_INFOorSASL_INHERIT.USER_INFO- Uses username and password authentication for Confluent Schema Registry.SASL_INHERIT- Inherits the authentication configuration from Kafka for the Confluent Schema Registry.
- username String
- Username for the Schema Registry. Required when
typeisUSER_INFO.
- password string
- Password for the Schema Registry. Required when
typeisUSER_INFO. - type string
- Authentication type discriminator. Specifies the authentication mechanism for Confluent Schema Registry. Valid values are
USER_INFOorSASL_INHERIT.USER_INFO- Uses username and password authentication for Confluent Schema Registry.SASL_INHERIT- Inherits the authentication configuration from Kafka for the Confluent Schema Registry.
- username string
- Username for the Schema Registry. Required when
typeisUSER_INFO.
- password str
- Password for the Schema Registry. Required when
typeisUSER_INFO. - type str
- Authentication type discriminator. Specifies the authentication mechanism for Confluent Schema Registry. Valid values are
USER_INFOorSASL_INHERIT.USER_INFO- Uses username and password authentication for Confluent Schema Registry.SASL_INHERIT- Inherits the authentication configuration from Kafka for the Confluent Schema Registry.
- username str
- Username for the Schema Registry. Required when
typeisUSER_INFO.
- password String
- Password for the Schema Registry. Required when
typeisUSER_INFO. - type String
- Authentication type discriminator. Specifies the authentication mechanism for Confluent Schema Registry. Valid values are
USER_INFOorSASL_INHERIT.USER_INFO- Uses username and password authentication for Confluent Schema Registry.SASL_INHERIT- Inherits the authentication configuration from Kafka for the Confluent Schema Registry.
- username String
- Username for the Schema Registry. Required when
typeisUSER_INFO.
StreamConnectionSecurity, StreamConnectionSecurityArgs
- Broker
Public stringCertificate - 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_PLAINTEXTorSASL_SSL.
- Broker
Public stringCertificate - 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_PLAINTEXTorSASL_SSL.
- broker
Public StringCertificate - 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_PLAINTEXTorSASL_SSL.
- broker
Public stringCertificate - 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_PLAINTEXTorSASL_SSL.
- broker_
public_ strcertificate - 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_PLAINTEXTorSASL_SSL.
- broker
Public StringCertificate - 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_PLAINTEXTorSASL_SSL.
StreamConnectionTimeouts, StreamConnectionTimeoutsArgs
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
mongodbatlasTerraform Provider.
