cyrilgdn / terraform-provider-postgresql

Terraform PostgreSQL provider
https://www.terraform.io/docs/providers/postgresql/
Mozilla Public License 2.0
356 stars 182 forks source link

Add 'Injecting credentials' section to provider docs #318

Closed rdarcy1 closed 10 months ago

rdarcy1 commented 1 year ago

Closes #196

Like the author of the above issue, I also spent some time looking for a solution to provide credentials to this provider so have documented the options based on cyrilgdn's comment.

Despite some of this being built-in Terraform functionality, I (and I imagine many others) have mainly used cloud providers such as AWS, where there's only a need to provide a couple of well-documented environment variables. It's much more likely with the PostgreSQL provider that you'll want to dynamically reference a data source or resource (e.g. an RDS instance that's created in another module) so I feel it's valuable to document examples of this.

Open to edits/suggestions if there are better ways of expressing this.