Closed katieclaiborne closed 7 months ago
Hi Katie! I think this is a great suggestion for sure. Slack is tricky, because in our current backend code, a single admin-level user per account makes the connection to slack, and from there, all notifications are sent over that bridge.
I'm not saying it's impossible, it's just an additional layer of complexity involved, because for email we are self contained. For slack, we have to OAuth against slack initially to link dbt Cloud to your Slack account, before we can actually configure the notifications.
Likely this might require the configuration of two different terraform resources: Resource 1 for the connection itself (which is stored in one database table) Resource 2 for the notification configuration record (which is in a different table, but the same one as the email configs).
I'll let @b-per drop his thoughts in too, as this would be great to be able to do!
I can have a look yes, but I am not sure how easy it is. It definitely won't be easy or possible to set the Slack connection itself from Terraform, but we might be able to set the notifications, once the connection is configured correctly from the UI.
As a workaround, would you be able to use the ability to send emails to a specific address to get notifications sent to Slack?
Sending notifications to external email addresses is already available in the Terraform provider.
Yes! I'll give it a look this week and report back.
I'm blocked on our Slack admins at the moment, but agree in principle that email notifications represent a workaround.
At the same time, I do still think the ability to configure Slack notifications in Terraform (assuming a manually pre-configured connection) is worth exploring.
I actually just added support for it in 0.2.17. It should be out soon.
That's so exciting! Thank you, Benoit.
Is your feature request related to a problem? Please describe.
I'm working to import dbt Cloud resources into our Terraform state, and would like to be able to include our Slack notifications.
Describe the solution you'd like
I'd like to be able to configure Slack notifications for a job as a resource.
I see an existing notification resource, but it appears to be specific to email notifications. Please correct me if I'm wrong here!
Describe alternatives you've considered
The documentation includes guidance for using the HTTP provider to retrieve data, but I figured I'd start by raising an issue.
Additional context
Based on the existing resource and the Create Notification endpoint, I think an example could look like: