terraform-provider-postgresql
terraform-provider-postgresql copied to clipboard
Feature request - allow provider variable assignment from postgres:// url (automatic parse)
This is mostly a feature request but is there any reason that the postgres provider does not already allow the usage of a URI / URL instead of forcing the explicit assignment of these variables?
typical postgres uri:
postgresql://[user[:password]@][netloc][:port][,...][/dbname]
Terraform Version
Terraform v0.12.25
Affected Resource(s)
NA
Terraform Configuration Files
provider "postgresql" {
host = "postgres_server_ip"
port = 5432
database = "postgres"
username = "postgres_user"
password = "postgres_password"
sslmode = "require"
connect_timeout = 15
}
Expected Behavior
provider "postgresql" {
url = "postgres://username:password@host:port/database"
sslmode = "require"
connect_timeout = 15
}
Actual Behavior
N/A
Steps to Reproduce
- Use Postgres Provider in tf config file.
Hi @sgoley ,
Thanks for opening this feature request.
is there any reason that the postgres provider does not already allow the usage of a URI / URL instead of forcing the explicit assignment of these variables?
No reason I think, just nobody asked for it until now :)
I note this request and will let you know here when we can work on it.