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

postgresql_grant says schema is required for database but documentation says otherwise #296

Closed DevopsMercenary closed 1 year ago

DevopsMercenary commented 1 year ago

Hi there,

Thank you for opening an issue. Please provide the following information:

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Terraform v1.3.8 on darwin_amd64

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files


resource "postgresql_grant" "pii-db-role-read-only-connect" {
  database    = "my_database"
  role        = "my_new_role"
  object_type = "database"
  privileges  = ["CONNECT"]
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

Expected the Grant to Be applied, per the documentation...

schema - The database schema to grant privileges on for this role (Required except if object_type is "database")

Actual Behavior

What actually happened?

│ Error: parameter 'schema' is mandatory for postgresql_grant resource

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Maybe I should just set it to "" ?

DevopsMercenary commented 1 year ago

I can't read my own code :-)