-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various changes to the PostgreSQL provider #10682
Conversation
… idioms. Also don't specify the default and rely on github.com/lib/pq (which uses "required" and is different than what libpq(3) uses, which is "preferred" and unsupported by github.com/lib/pq).
can be removed in Terraform 0.8.0
If they're required and the value is missing, the test will fail. There's no need to enforce that in the test itself.
This will cause someone some grief. TODO: Figure out how to prevent someone from blowing off their foot if they twiddle this after the fact.
…t PGHOSTADDR. https://github.com/lib/pq/blob/d8eeeb8bae8896dd8e1b7e514ab0d396c4f12a1b/conn.go#L1851 This reverts commit 26a2a974f2b2f2cefd41b426b8469fa3ea72b33e.
…slmode`. Both libpq(3) and github.com/lib/pq both use `sslmode`. Prefer this vs the non-standard `ssl_mode`. `ssl_mode` is supported for compatibility but should be removed in the future. Changelog: yes
* Add support to import databases. See docs. * Add support for renaming databases * Add support for all known PostgreSQL database attributes, including: * "allow_connections" * "lc_ctype" * "lc_collate" * "connection_limit" * "encoding" * "is_template" * "owner" * "tablespace_name" * "template"
Add "pathological" test.
*Read() and *Update() still need to be updated.
@jen20 is going to give this another pair of 👀 it LGTM! I love the addition of tfAppName for tracking. The other change of node is the ssl_mode is now deprecated in-favour of sslmode
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few very minor comments here, but 👍 from me. If the first version is 0.8, now is the time to address removing the environment variables mentioned in three of the comments.
@@ -0,0 +1,28 @@ | |||
POSTGRES?=/opt/local/lib/postgresql96/bin/postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth adding a comment to the top of this file stating the intended use, or use the "self-documenting" structure and make the help
target be the default.
Required: true, | ||
Type: schema.TypeString, | ||
Optional: true, | ||
// TODO(sean@): Remove POSTGRESQL_HOST in 0.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first release this will see is 0.8 - do we want to remove this now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be okay with that. I've had this kicking around in some form since the mid-0.7 days. Removing now.
"username": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
// TODO(sean@): Remove POSTGRESQL_USER in 0.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same re 0.8 removal
Optional: true, | ||
Type: schema.TypeString, | ||
Optional: true, | ||
// TODO(sean@): Remove POSTGRESQL_PASSWORD in 0.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same re 0.8 removal
@@ -6,40 +6,101 @@ import ( | |||
"testing" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting error on imports here
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This is basically ready to be reviewed. Before it can be merged one test needs to be fixed (hence the checkpoint, want a pair of eyes) and the version attribute should be added to
postgresql_extension
(almost done).CC @kyxap1 and @samdunne who have been doing some PostgreSQL provider work recently.