Skip to content

Add function resource #200

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

Merged
merged 8 commits into from
May 7, 2022
Merged

Add function resource #200

merged 8 commits into from
May 7, 2022

Conversation

dump247
Copy link
Contributor

@dump247 dump247 commented Apr 11, 2022

The use case for this resource is setting up datadog agent access. It requires defining a datadog.explain_statement function that the dd agent expects to exist. I can setup everything in terraform except for the required function.

https://docs.datadoghq.com/database_monitoring/setup_postgres/aurora/?tab=postgres10

dump247 added 6 commits April 11, 2022 15:51
Fix missing quotes in physical_replication_slot doc.
Older versions of postgresql do not support the necessary syntax in CREATE FUNCTION.
Fixed some issues that were exposed by the tests
@dump247
Copy link
Contributor Author

dump247 commented Apr 15, 2022

@cyrilgdn Would you be able to take a look at this?

@cyrilgdn cyrilgdn self-requested a review April 17, 2022 15:16
@dump247
Copy link
Contributor Author

dump247 commented Apr 19, 2022

@cyrilgdn Any feedback for this change?

If it helps, I would be happy to accept longer term responsibility for this resource. I don't know how that would work, but I can tackle bugs and such.

@cyrilgdn
Copy link
Owner

@dump247 I'll have a look as soon as I can, it could take a few days though, sorry for that.

@dump247
Copy link
Contributor Author

dump247 commented Apr 19, 2022

No worries. Thank you for taking a look. Let me know if there is anything I can do to facilitate the review.

@dump247
Copy link
Contributor Author

dump247 commented Apr 28, 2022

@cyrilgdn Any updates?

Copy link
Owner

@cyrilgdn cyrilgdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a tiny comment about unnecessary use of transaction that can simplify the code, otherwise it's look good 👍
Many thanks for your work on this and sorry again for the response delay.

Copy link
Owner

@cyrilgdn cyrilgdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dump247 Thanks a lot for your work on that 👍

@cyrilgdn cyrilgdn merged commit ec08867 into cyrilgdn:master May 7, 2022
cyrilgdn added a commit that referenced this pull request May 8, 2022
@cyrilgdn
Copy link
Owner

cyrilgdn commented May 8, 2022

FYI, this has just been released in v1.16.0

@PaleoW
Copy link

PaleoW commented May 20, 2022

Hi @cyrilgdn ,
Thank you for this new postgresql_function ressource !

Would it be possible to add support for the "database" parameter for this ressource as well ?
Right now, it seems like there is no way to override the provider's database.

Thank you

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.

3 participants