Hello,
I’m trying to use the aws_msk_serverless_cluster
resource to create AWS MSK serverless cluster. How can I get the bootstrap server endpoint after the cluster is created? I don’t see an attribute that exports the endpoint. I don’t see a data source for a serverless MSK cluster either.
Thanks in advance
Also eager for this answer - my latest attempt was to try the aws_msk_cluster data source, but that errors with “Error: reading MSK Cluster (test-cluster-name): no results found”
you can do it this way :
data "aws_msk_bootstrap_brokers" "kafka" {
cluster_arn = aws_msk_serverless_cluster.default.arn
}
output "kafka-servers" {
value = data.aws_msk_bootstrap_brokers.kafka.bootstrap_brokers_sasl_iam
}