terraform-provider-postgresql
terraform-provider-postgresql copied to clipboard
Add event trigger resource management
I'm opening this as a draft in case anyone wants to give feedback or test the code.
This should allow us to manage event triggers in this provider, here's how the resource would look like:
resource "postgresql_event_trigger" "event_trigger" {
name = "event_trigger_test"
database = postgresql_database.database.name
schema = postgresql_schema.schema.name
function = postgresql_function.function.name
on = "ddl_command_end"
owner = "postgres"
status = "enable"
filter {
variable = "TAG"
values = [
"CREATE TABLE",
"ALTER TABLE",
]
}
}
Closes #398
@cyrilgdn I've used this to add a few hundred event triggers where I work, our fork has a few more commits with some fixes of things that we found after opening the PR, I can push the fixes to this branch but it's not clear to me if you're interested in that, let me know either way.
Hi @Fabianoshz ,
Thanks for your work and for opening this PR, I'm interested yes, I'm just lacking a bit of time to review it properly but will have a look as soon as possible 👍
Perfect, I take some time this week to push the other fixes we've added on our fork
@cyrilgdn thanks for throughout review, I will start working on fixing in the next few days
My organization would also benefit from this feature! @Fabianoshz really appreciate your contribution here. @cyrilgdn please let me know if I can help in any way to get this feature in!
This would be very nice to have in provider! It would benefit me too.