Serverless Cluster
Manages an Amazon MSK Serverless cluster.
Note: To manage a provisioned Amazon MSK cluster, use the
aws.msk.Cluster
resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.msk.ServerlessCluster("example", {
clusterName: "Example",
vpcConfigs: [{
subnetIds: exampleAwsSubnet.map(__item => __item.id),
securityGroupIds: [exampleAwsSecurityGroup.id],
}],
clientAuthentication: {
sasl: {
iam: {
enabled: true,
},
},
},
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.msk.ServerlessCluster("example",
cluster_name="Example",
vpc_configs=[{
"subnet_ids": [__item["id"] for __item in example_aws_subnet],
"security_group_ids": [example_aws_security_group["id"]],
}],
client_authentication={
"sasl": {
"iam": {
"enabled": True,
},
},
})
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Msk.ServerlessCluster("example", new()
{
ClusterName = "Example",
VpcConfigs = new[]
{
new Aws.Msk.Inputs.ServerlessClusterVpcConfigArgs
{
SubnetIds = exampleAwsSubnet.Select(__item => __item.Id).ToList(),
SecurityGroupIds = new[]
{
exampleAwsSecurityGroup.Id,
},
},
},
ClientAuthentication = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationArgs
{
Sasl = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslArgs
{
Iam = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslIamArgs
{
Enabled = true,
},
},
},
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := msk.NewServerlessCluster(ctx, "example", &msk.ServerlessClusterArgs{
ClusterName: pulumi.String("Example"),
VpcConfigs: msk.ServerlessClusterVpcConfigArray{
&msk.ServerlessClusterVpcConfigArgs{
SubnetIds: []pulumi.String(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:3,24-46)),
SecurityGroupIds: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
},
},
ClientAuthentication: &msk.ServerlessClusterClientAuthenticationArgs{
Sasl: &msk.ServerlessClusterClientAuthenticationSaslArgs{
Iam: &msk.ServerlessClusterClientAuthenticationSaslIamArgs{
Enabled: pulumi.Bool(true),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.msk.ServerlessCluster;
import com.pulumi.aws.msk.ServerlessClusterArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterVpcConfigArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationSaslArgs;
import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationSaslIamArgs;
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 ServerlessCluster("example", ServerlessClusterArgs.builder()
.clusterName("Example")
.vpcConfigs(ServerlessClusterVpcConfigArgs.builder()
.subnetIds(exampleAwsSubnet.stream().map(element -> element.id()).collect(toList()))
.securityGroupIds(exampleAwsSecurityGroup.id())
.build())
.clientAuthentication(ServerlessClusterClientAuthenticationArgs.builder()
.sasl(ServerlessClusterClientAuthenticationSaslArgs.builder()
.iam(ServerlessClusterClientAuthenticationSaslIamArgs.builder()
.enabled(true)
.build())
.build())
.build())
.build());
}
}
Content copied to clipboard
Import
Using pulumi import
, import MSK serverless clusters using the cluster arn
. For example:
$ pulumi import aws:msk/serverlessCluster:ServerlessCluster example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3
Content copied to clipboard
Properties
Link copied to clipboard
One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, boot-abcdefg.c2.kafka-serverless.eu-central-1.amazonaws.com:9098
. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
Link copied to clipboard
Specifies client authentication information for the serverless cluster. See below.
Link copied to clipboard
The name of the serverless cluster.
Link copied to clipboard
UUID of the serverless cluster, for use in IAM policies.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
VPC configuration information. See below.