You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.
resource"postgresql_database""database" {
for_each=var.databasesname=each.keytemplate="template1"lc_collate="en_US.UTF-8"lc_ctype="en_US.UTF-8"
}
// Don't allow the public role to create in the public schemaresource"postgresql_schema""public" {
for_each=var.databasesdatabase=each.keyname="public"policy {
role="public"create=falsecreate_with_grant=falseusage=falseusage_with_grant=false
}
}
Expected Behavior
I'd expect the public role not to have the (default) usage and create permissions on the public schema
Actual Behavior
The public schema still allows any user (with the public role) to use and create tables. Note that setting create and usage to true and applying, followed by setting them back to false and applying again does remove the permissions as expected.
Important Factoids
Running on RDS created Postgres 12.3 instance
The text was updated successfully, but these errors were encountered:
When creating a resource, it is only granting permissions, and the code does not seem to have any functionality related to revoking implicitly granted permissions
When refreshing the schema resource, while the code reads and parses the policies, it doesn't actually do anything with them. Meaning Terraform will only compare previously set state to desired state, with the current state being completely ignored.
Terraform Version
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Expected Behavior
I'd expect the
public
role not to have the (default)usage
andcreate
permissions on thepublic
schemaActual Behavior
The
public
schema still allows any user (with thepublic
role) to use and create tables. Note that settingcreate
andusage
totrue
and applying, followed by setting them back tofalse
and applying again does remove the permissions as expected.Important Factoids
Running on RDS created Postgres 12.3 instance
The text was updated successfully, but these errors were encountered: