terraform-provider-postgresql
terraform-provider-postgresql copied to clipboard
The provider doesn't like spaces in passwords
Version:
Terraform v0.14.11
+ provider registry.terraform.io/cyrilgdn/postgresql v1.14.0
+ provider registry.terraform.io/hashicorp/aws v3.56.0
+ provider registry.terraform.io/hashicorp/google v3.65.0
+ provider registry.terraform.io/hashicorp/google-beta v3.82.0
+ provider registry.terraform.io/hashicorp/http v2.1.0
This works:
provider "postgresql" {
scheme = "gcppostgres"
host = <my cloudsql host>
username = "test"
password = "abc123"
superuser = false
}
This throws Error: error detecting capabilities: error PostgreSQL version: pq: password authentication failed for user "test"
:
provider "postgresql" {
scheme = "gcppostgres"
host = <my cloudsql host>
username = "test"
password = "this is a pass phrase"
superuser = false
}
QueryEscape call encodes a space with a "+" character, whereas lib/pq requires any part of a connection URI to be encoded with percent-encoding. @cyrilgdn What do you think about using PathEscape instead of QueryEscape? I can prepare a PR if you are okay with this change.
What do you think about using PathEscape instead of QueryEscape? I can prepare a PR if you are okay with this change.
@kostiantyn-nemchenko If it fixes it, go ahead yes :+1: Thanks in advance!