Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

Feature request - allow provider variable assignment from postgres:// url (automatic parse) #143

Open
sgoley opened this issue May 30, 2020 · 1 comment

Comments

@sgoley
Copy link

sgoley commented May 30, 2020

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

  1. Use Postgres Provider in tf config file.
@cyrilgdn
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants