Skip to content

Unstable connection to postgres via proxy #495

@esulzickis

Description

@esulzickis

Terraform Version

opentofu 1.8.2

Affected Resource(s)

  • postgresql_role
  • postgresql_grant_role
  • postgresql_database

Terraform Configuration Files

provider "postgresql" {
  host      = var.db_endpoint
  port      = 5432
  database  = "postgres"
  username  = local.db_creds.username
  password  = local.db_creds.password
  sslmode   = "require"
  superuser = false
  #
  max_connections = 0
  connect_timeout = 360
}

Debug Output

https://gist.github.com/esulzickis/25d5e40cf893e4957d1ba0e10d123aef

Expected Behavior

Connecting to postgresql_role resource through tailscale proxy should not show an error

Actual Behavior

Sometimes when connecting through proxy connection works and sometimes not. The behavior is unstable

Steps to Reproduce

  1. export ALL_PROXY="socks5h://localhost:1055"
  2. tofu plan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions