-
Notifications
You must be signed in to change notification settings - Fork 258
Description
Hi,
Please can you help me.
I have a Fargate/RDS terraform build.
I'm constantly struggling trying to get Terraform to work with the postgreSQL connector. (I'm still here at 4pm on a Saturday)
I ran a tf apply to apply a database encryption from not, which destroyed the database as expected with the view to rebuild it encrypted.
Then it errored on the postgresql connection from the postgresql provider
Since then I cant, destroy, state rm, apply or anything
I have manually edited the state file but tf didnt like that so I have restored that
I cant seem to get past the point of this weird error detecting capabilities: error PostgreSQL version: dial tcp 127.0.0.1:5432: connect: connection refused error
All I wanted to do was encrypt the database at rest. Its taken probably two days of time so far and still no further with it.
Terraform Version
1.0.1 and 1.0.5
Affected Resource(s)
postgresql _role and postgresql_database
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Its just the dependency between the db and this connector that is flakey
Terraform Configuration Files
Expected Behavior
Terraform should have ignored the provider side of things - since the database was destroyed and does not exist in the state file now - why is it trying to connect at all at this point!
Actual Behavior
Error: error detecting capabilities: error PostgreSQL version: dial tcp 127.0.0.1:5432: connect: connection refused
Error: error detecting capabilities: error PostgreSQL version: dial tcp 127.0.0.1:5432: connect: connection refused
Makefile:60: recipe for target 'tfapply' failed
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Trying to make an encrypted rds psql instance, this cyrilgdn connector doesnt seem to like that at all
Just added vpc peering to allow this box to communicate better with the db, not tested since not past this issue