Manages an Amazon MSK Serverless cluster.
resource "aws_msk_serverless_cluster" "example" {
cluster_name = "Example"
vpc_config {
subnet_ids = aws_subnet.example[*].id
security_group_ids = [aws_security_group.example.id]
}
client_authentication {
sasl {
iam {
enabled = true
}
}
}
}
This resource supports the following arguments:
client_authentication
- (Required) Specifies client authentication information for the serverless cluster. See below.cluster_name
- (Required) The name of the serverless cluster.tags
- (Optional) A map of tags to assign to the resource. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.vpc_config
- (Required) VPC configuration information. See below.sasl
- (Required) Details for client authentication using SASL. See below.iam
- (Required) Details for client authentication using IAM. See below.enabled
- (Required) Whether SASL/IAM authentication is enabled or not.security_group_ids
- (Optional) Specifies up to five security groups that control inbound and outbound traffic for the serverless cluster.subnet_ids
- (Required) A list of subnets in at least two different Availability Zones that host your client applications.This resource exports the following attributes in addition to the arguments above:
arn
- The ARN of the serverless cluster.cluster_uuid
- UUID of the serverless cluster, for use in IAM policies.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.create
- (Default 120m
)delete
- (Default 120m
)In Terraform v1.5.0 and later, use an import
block to import MSK serverless clusters using the cluster arn
. For example:
import {
to = aws_msk_serverless_cluster.example
id = "arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3"
}
Using terraform import
, import MSK serverless clusters using the cluster arn
. For example:
% terraform import aws_msk_serverless_cluster.example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3