Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Grant same privileges on multiple schemas #108

@Olaktal

Description

@Olaktal

Hello

We need to give rights ("select" or more) on multiple schemas.
For now it looks like a lot like

resource "redshift_grant" "readonly_schema1" {
  group       = redshift_group.readonlygroup.name
  schema      = "schema1"
  object_type = "table"
  privileges  = ["select"]
}

resource "redshift_grant" "readonly_schema2" {
  group       = redshift_group.readonlygroup.name
  schema      = "schema2"
  object_type = "table"
  privileges  = ["select"]
}

It a real mess between since we need A LOT of redshift_grant due to our huge amount of groups x schema.
Would it be possible to declare a list of schema instead of a single schema ?
It would look like as follow.

resource "redshift_grant" "readonly" {
  group       = redshift_group.readonlygroup.name
  schemas      = ["schema1", "schema2"]
  object_type = "table"
  privileges  = ["select"]
}

Don't you have yourself the same problem ?

Vincent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions