provider "postgresql" {
host = var.postgresql_user_server_fqdn
port = 5432
username = var.administrator_login
password = var.administrator_password
sslmode = "require"
superuser = false
alias = "create_user"
}
I am using this provider block to connect to postgresql every time. It give the mentioned error occasionally at different interval and goes away automatically. Please help.
Unable to connect with Azure postgres with Terraform
Getting below error while trying to connect to postgres with terraform. pls help.
Error: error detecting capabilities: error PostgreSQL version: dial tcp XX.XXX.XXX.XXX:5432: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2 answers
Sort by: Most helpful
-
Nitin Naidu (Consultant) 51 Reputation points
2023-03-29T07:15:28.95+00:00 -
GeethaThatipatri-MSFT 29,482 Reputation points Microsoft Employee
2023-04-10T14:45:35.0533333+00:00 @Nitin Naidu (Consultant) This seems you are using the postgresql provider. Seems hashicorp doesn’t maintain/support it for a long time. You can see more details here. Suggest using “azurerm_postgresql_flexible_server” and “azurerm_postgresql_server” in terraform azurerm provider.
Hope this information helps
Regards
Geetha