1. Data orchestration using AWS Managed Streaming for Kafka (MSK)


    Based on your goal and registry query result, we are going to use the aws.msk.Cluster resource from the AWS Pulumi provider. This is used to manage an Amazon Managed Streaming for Apache Kafka (Amazon MSK) cluster.

    Below is a simple Pulumi program that creates a minimal MSK cluster. This example assumes that you already have the necessary security group and subnet IDs. Please replace "sg-xxxxxxxx" and "subnet-xxxxxxxx" with your actual security group and subnet IDs. If you do not have these resources yet, you can also create them with Pulumi.

    using Pulumi; using Pulumi.Aws.Msk; class MskClusterProgram : Pulumi.Stack { public MskClusterProgram() { var mskCluster = new Cluster("myMskCluster", new ClusterArgs { BrokerNodeGroupInfo = new ClusterBrokerNodeGroupInfoArgs { ClientSubnets = new InputList<string> { "subnet-xxxxxxxx", "subnet-xxxxxxxx", "subnet-xxxxxxxx"}, EbsVolumeSize = 100, // size in GiB for the EBS volume for the data drive on each broker node InstanceType = "kafka.t3.small", // kafka broker instance type SecurityGroups = new InputList<string> { "sg-xxxxxxxx" }, //security group associated with the elastic network interfaces to control who can communicate with the cluster }, ClusterName = "my-cluster", //your cluster name KafkaVersion = "2.6.1", // kafka version NumberOfBrokerNodes = 2 //number of broker nodes in the cluster }); this.ClusterArn = mskCluster.Arn; } [Output] public Output<string>? ClusterArn { get; set; } }

    This is a very basic setup for an MSK cluster. Depending on your specific use case, you might want to adjust this setup, e.g. by adding different types of client authentication, tweaking the storage setup or enabling open monitoring. For more options and details, you can refer to the aws.msk.Cluster documentation.

    Remember to run pulumi up to execute the program and create your resources.