-
Notifications
You must be signed in to change notification settings - Fork 258
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
Databases: Set Kafka Connection Attributes (port, uri, private_uri) #1131
base: main
Are you sure you want to change the base?
Conversation
// default for kafka will be Public SASL port, consistent with UI | ||
d.Set("port", kafkaPublicSSLPort) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the ports guaranteed to be stable? Maybe we should grab it from the response? Something like:
const kafkaSASL = "sasl"
if database.Connection.ApplicationPorts != nil {
if saslPort, ok := database.Connection.ApplicationPorts[kafkaSASL]; ok {
d.Set("port", saslPort)
}
}
func buildKafkaConnectionURI(conn *godo.DatabaseConnection, port int) string { | ||
host := conn.Host | ||
|
||
uri := fmt.Sprintf("%s:%d", host, port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make sure that this is consistent with what the DBaaS team will eventually return from the API. Should there be a scheme? The other engines all seem to use the format scheme://user:pass@host:port
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make sure that this is consistent with what the DBaaS team will eventually return from the API. Should there be a scheme? The other engines all seem to use the format
scheme://user:pass@host:port
Converting this PR to a draft as dbaas said they might actually get to it this week or next!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
Addresses #1121
Database team is working on a ticket to address this in the API layer, but in the meantime this sets the port, uri, and private uri at the terraform layer so users can easily collect connection details for their kafka clusters.
Default port will be the public SASL port, 25073. This is consistent with the UI.