Skip to content

Exclude schema in a rule #697

@naub1n

Description

@naub1n

What do you want?

Hi,

I want to apply rule to all schema except two.

I have a default rule for all schemas.
And I want to apply specific rule on two schemas.

Schemas are created dynamically by users and I don't want to write a rules for each schema.

Example :

rules:
- grant:
    privilege: writer
    databases: my_database
    schema: __all__
    role: my_role

- grant:
    privilege: reader
    databases: my_database
    schema: my_schema
    role: my_role

If I do that, my_role keep writer privilege on my_schema

It can be usefull to exclude some schemas with a character, like this:

rules:
- grant:
    privilege: writer
    databases: my_database
    schemas: 
      - !my_schema
    role: myrole

Or use custom sql to select schemas other than schemas_query

I can exclude schemas in schemas_query but I want them stay managed

Is there another way to do that ?

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