Skip to content

Support for any object_type in postgresql_default_privileges #470

@loganmzz

Description

@loganmzz

Terraform Version

Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/cyrilgdn/postgresql v1.23.0
+ provider registry.terraform.io/hashicorp/aws v5.68.0
+ provider registry.terraform.io/hashicorp/random v3.6.2

Affected Resource(s)

  • postgresql_default_privileges

Terraform Configuration Files

resource "postgresql_default_privileges" "this" {
  role = "main"
  database = "postgres"
  schema = "public"

  owner = "admin"
  object_type = "routine"
  privileges = ["EXECUTE"]
}

Panic Output

│ Error: expected object_type to be one of [table sequence function type schema], got routine
│ 
│   with postgresql_default_privileges.this,
│   on main.tf line 7, in resource "postgresql_default_privileges" "this":
│  7:   object_type = "routine"

Expected Behavior

Support any PgSQL supported type (documentation: https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html)

Actual Behavior

Plan error

Steps to Reproduce

  1. terraform plan

Important Factoids

N/A

References

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions