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

fix(postgresql_role): Postgresql 16 compatibility (with new roles management) (#407) #481

Closed
wants to merge 1 commit into from

Conversation

librucha
Copy link
Contributor

Fixes #407

  • Added parameters attribute to postgresql_role resource.
  • Bumped golang version (1.21 is minimal because slices.Contains())
  • Enhanced .gitignore
  • Added feature enum for Postgresql 16 create role self grant
  • Added warning to provider configuration if create role self grant is not set properly on connection user
  • Fixed test for Postgresql 16 compatibility

@cyrilgdn
Copy link
Owner

Hi @librucha ,

Thanks for your work on that 👍
I'll review it as soon as possible

To answer your question in the PR:

I have implemented solution for "fix" this behavior without change parameters createrole_self_grant on role or database but here is the question is it a good approach?

I think what you did is nice to manage properly this new feature, but as we need to double think on the potential impact of this new way of roles management (there's plenty of hack in the code to make the provider working properly without being superuser), meanwhile I've just made a very small fix that will be release in v1.24 to be compatible with Postgres 16 without managing properly the create role self grant feature like you did.

As I defined the same feature flag you use in my change, you need to merge main branch in yours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgresql 16 compatibility (with new roles management)
2 participants