-
Notifications
You must be signed in to change notification settings - Fork 79
Add postgresql_grant_role resource #189
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
func resourcePostgreSQLGrantRoleRead(d *schema.ResourceData, meta interface{}) error { | ||
client := meta.(*Client) |
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.
Is there not a worry of a panic if the type assertion fails?
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've typically seen providers implemented without a worry here
Co-authored-by: Danny Hermes <daniel.j.hermes@gmail.com>
Co-authored-by: Danny Hermes <daniel.j.hermes@gmail.com>
Co-authored-by: Danny Hermes <daniel.j.hermes@gmail.com>
Co-authored-by: Danny Hermes <daniel.j.hermes@gmail.com>
Thank you for your PR and work, @Vince-Chenal and @dvdliao! I just wanted to ask - there is already https://www.terraform.io/docs/providers/postgresql/r/postgresql_role.html#roles, which does something similar, but on a very basic level. How will this resource coexist with existing property on postgresql_role? I have a feeling that there will be a conflict after terraform refresh or maybe even on plan. Generally I like the direction - gives more flexibility and might actually solve some issues out of the box (#173). |
It should coexist, but not be used together, see something like: https://www.terraform.io/docs/providers/google/r/sql_user.html heres another example in terraform where we have the same resources that are authoritative and nonauthoritative: https://www.terraform.io/docs/providers/google/r/google_project_iam.html |
Thank you, this is what I meant - these resources should not be used on the same role. Thanks for linking google example, wasn't aware of these kind of cases. |
@dvdliao Thanks for your work on this, I'll take a look in the next days. |
It's hashicorp stuff that we don't have access to anymore.
Set up Github Workflows
Correctly save role with quoted search path
credit to: @Vince-Chenal
closes: #154