-
Notifications
You must be signed in to change notification settings - Fork 212
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
could not start transaction: dial tcp : connect: connection timed out #175
Comments
Facing same issue while trying to create multiple databases. I tried with public access and disabling SSL but still it fails with connection timeout
Error
|
Also facing the same issue. It tries to dial a local IP |
@Manoj-07 From where are you running Terraform? If you are outside the VPC, it will not be able to reach your instance, you'll need a network load balancer, a VPN or SSH tunnel to execute it. |
@sachinb4u Same as for @Manoj-07 . Do you run terraform from outside your VPC?
This is a private IP so can be reachable only from within the VPC. |
What if I apply the plan from Terraform cloud? |
@cyrilgdn I am on version
I tried making the instance publicly available but still got the same error. I assumed making it publicly available would rule out VPC issues, is that assumption not correct? EDIT: apparently not. Even for publicly accessible RDS instances, VPC/security groups still need to be configured. |
I'm having this problem as well. My Postgres instance is in a private subnet, and I'm using Terraform Cloud. The IP reported is a private IP. Unless I'm mistaken, it sounds like you cannot use this provider if your install is in the cloud and you are following security recommendations and disallowing public access to the instance. I'm using Flask for this project, and I was trying to use this provider to install the PostGIS extension. Instead of doing this in Terraform, I solved the problem by moving the create extension code into the Flask initialization: __init.py__ db.engine.execute("CREATE EXTENSION IF NOT EXISTS postgis") |
@nk9 I have successfully used this provider with RDS in a private subnet. It just requires all the proper VPC plumbing to ensure wherever you are running the provider from has access to that subnet. |
Do you happen to have an example of this success? this would be helpful as this seems to be a pretty widely seen problem |
I am pretty sure that he meant the following. I was confused as well, as the documentation does not make that clear. Maybe that is context to add. |
Hi there,
Thank you for opening an issue. Please provide the following information:
Terraform Version-1.0.11
##provider version
My aws_db_instance is created using a private subnet and it is not publicly_accessible.
while I am trying to create the following by using the above provider version I am getting timeout error
resource "postgresql_database" "dev_db" {
}
could anyone please let me know how to resolve it?
The text was updated successfully, but these errors were encountered: