Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/postgres-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ pub enum PostgresError {
Ssh(#[source] anyhow::Error),
/// Error doing io to setup an ssh connection.
#[error("error communicating with ssh tunnel: {0}")]
SshIo(#[from] std::io::Error),
SshIo(std::io::Error),
/// Error doing io to setup a connection.
#[error("IO error in connection: {0}")]
Io(#[from] std::io::Error),
/// A postgres error.
#[error(transparent)]
Postgres(#[from] tokio_postgres::Error),
Expand Down
4 changes: 3 additions & 1 deletion src/postgres-util/src/tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ impl Config {
// the singular host in place.

let privatelink_host = mz_cloud_resources::vpc_endpoint_name(*connection_id);
let privatelink_addrs = tokio::net::lookup_host(privatelink_host).await?;
// `net::lookup_host` requires a port to be specified, but the port has no effect
// on the lookup so use a dummy one
let privatelink_addrs = tokio::net::lookup_host((privatelink_host, 11111)).await?;

// Override the actual IPs to connect to for the TCP connection, leaving the original host in-place
// for TLS verification
Expand Down