Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexibility to grant permissions to use extensions #177

Open
offzale opened this issue May 16, 2024 · 0 comments
Open

Flexibility to grant permissions to use extensions #177

offzale opened this issue May 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@offzale
Copy link

offzale commented May 16, 2024

What problem are you facing?

I am trying to provision an extension and the permissions to use it to a role. However, I am not able to do so since the Grant resource is quite limited.

The equivalent SQL statements of what I am trying to achieve are the following.

CREATE EXTENSION postgres_fdw;
GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO <role>;

The extension could be installed like this.

apiVersion: postgresql.sql.crossplane.io/v1alpha1
kind: Extension
metadata:
  name: postgres-fdw
spec:
  providerConfigRef:
    name: postgres
  forProvider:
    database: my_db
    schema: public
    extension: postgres_fdw
    version: "1.1"

However, the required GRANT cannot be translated to the current Grant spec. I tried setting the privileges to ["USAGE ON FOREIGN DATA WRAPPER postgres_fdw"], but it is not supported as it does not match the regex ^[A-Z]+$.

How could Crossplane help solve your problem?

Extend the Grant resource to support a broader set of GRANT statements.

@offzale offzale added the enhancement New feature or request label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant