Skip to content

Resource: awsMskServerlessCluster

Manages an Amazon MSK Serverless cluster.

-> Note: To manage a provisioned Amazon MSK cluster, use the awsMskCluster resource.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.mskServerlessCluster.MskServerlessCluster(this, "example", {
  clientAuthentication: {
    sasl: {
      iam: {
        enabled: true,
      },
    },
  },
  clusterName: "Example",
  vpcConfig: [
    {
      securityGroupIds: ["${aws_security_group.example.id}"],
      subnetIds: "${aws_subnet.example[*].id}",
    },
  ],
});

Argument Reference

The following arguments are supported:

  • clientAuthentication - (Required) Specifies client authentication information for the serverless cluster. See below.
  • clusterName - (Required) The name of the serverless cluster.
  • tags - (Optional) A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  • vpcConfig - (Required) VPC configuration information. See below.

client_authentication Argument Reference

  • sasl - (Required) Details for client authentication using SASL. See below.

sasl Argument Reference

  • iam - (Required) Details for client authentication using IAM. See below.

iam Argument Reference

  • enabled - (Required) Whether SASL/IAM authentication is enabled or not.

vpc_config Argument Reference

  • securityGroupIds - (Optional) Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.
  • subnetIds - (Required) A list of subnets in at least two different Availability Zones that host your client applications.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - The ARN of the serverless cluster.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Timeouts

Configuration options:

  • create - (Default 120M)
  • delete - (Default 120M)

Import

MSK serverless clusters can be imported using the cluster arn, e.g.,

$ terraform import aws_msk_serverless_cluster.example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3