-
Notifications
You must be signed in to change notification settings - Fork 212
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
Fix ALL privileges for postgresql_grant #32
Comments
Hi @icterine , It's already possible but actually does not work correctly. If you set We need to find a way to fix it (I think will need a new |
Is there any way to work around this in the meantime? Its not blocking anything but it tends to confuse people and leads to a lot of uncertainty on whether the plan is valid. |
@zswanson You can simply pass all the possible privileges, and to avoid passing in multiple resources you can define local variables for that. e.g.: locals {
all_privileges_database = ["CREATE", "CONNECT", "TEMPORARY", "TEMP"]
all_privileges_table = ["SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER"]
}
resource "postgresql_grant" "test" {
database = "test_db"
role = "test_role"
schema = "public"
object_type = "table"
privileges = local.all_privileges_table
} Allowed privileges per type are defined here: https://github.com/cyrilgdn/terraform-provider-postgresql/blob/master/postgresql/helpers.go#L237-L244 See also: https://www.postgresql.org/docs/current/sql-grant.html |
For some reason locals {
all_privileges_database = ["CREATE", "CONNECT", "TEMPORARY"]
} |
I see the same issue but with |
Hi
It will be good if postgresql_grant resource will allow ALL in addition to others like
privileges - (Required) The list of privileges to grant. There are different kinds of privileges: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE.
as per
edit by @cyrilgdn :
Recreation of hashicorp/terraform-provider-postgresql#72 and hashicorp/terraform-provider-postgresql#166
The text was updated successfully, but these errors were encountered: