Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Include bootstrap server URL in aws_msk_serverless_cluster resource attributes #36930

Open
Telemaco019 opened this issue Apr 16, 2024 · 3 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/kafka Issues and PRs that pertain to the kafka service.

Comments

@Telemaco019
Copy link

Description

Despite #28005 being closed, the resource aws_msk_serverless_cluster still doesn't expose the bootstrap server URL in its attributes.

This means that, when using Terraform for creating MSK Serverless Clusters, the following workaround is required to get the URL for connecting with the cluster:

# Create the MSK Serverless Cluster
resource "aws_msk_serverless_cluster" "main" {
  cluster_name = "my-cluster"
  ...
}

# Fetch the created MSK Serverless Cluster, as `aws_msk_serverless_cluster` does not include
# the boostrap broker URLs in its attributes 
data "aws_msk_bootstrap_brokers" "main" {
  cluster_arn = aws_msk_serverless_cluster.main.arn
}

# Output: URL for connecting with the Kafka cluster
output "aws_msk_bootstrap_server_url" {
  value = data.aws_msk_bootstrap_brokers.main.bootstrap_brokers_sasl_iam
}

It would be way more convenient if the resource aws_msk_bootstrap_server_url just included the bootstrap URLs in its attributes.

Affected Resource(s) and/or Data Source(s)

aws_msk_serverless_cluster

Potential Terraform Configuration

# Create the MSK Serverless Cluster
resource "aws_msk_serverless_cluster" "main" {
  cluster_name = "my-cluster"
  ...
}

# Output: URL for connecting with the Kafka cluster
output "aws_msk_bootstrap_server_url" {
  value = aws_msk_serverless_cluster.main.bootstrap_brokers_sasl_iam
}

References

https://docs.aws.amazon.com/msk/1.0/apireference/clusters-clusterarn-bootstrap-brokers.html
https://docs.aws.amazon.com/cli/latest/reference/kafka/get-bootstrap-brokers.html

Would you like to implement a fix?

Yes

@Telemaco019 Telemaco019 added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 16, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/kafka Issues and PRs that pertain to the kafka service. label Apr 16, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 16, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label May 6, 2024
@HaykManukyanAvetiky
Copy link

Please also add Data for MSK serverless cluster , currently it is missing. The general cluster block for msk is not working with serverless

@HaykManukyanAvetiky
Copy link

Also please look at kafka connect as well, currently it is working only with peovisioned cluster, there should be serverless option added to kafka_cluster Block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/kafka Issues and PRs that pertain to the kafka service.
Projects
None yet
Development

No branches or pull requests

3 participants