Add documentation and validation for Slack V2 - #711
Open
victorasu wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Terraform provider’s notification resources to better support Slack account-level (V2) notifications by documenting the new notification_type = 5, adding config-time validation for required fields, and improving error details when the Slack V2 integration is not enabled.
Changes:
- Document
notification_type = 5(Slack V2) across schemas, docs, and examples. - Add
ValidateConfigchecks requiringslack_channel_idfor Slack notification types (2 and 5). - Improve create/update error details to provide actionable guidance when Slack V2 fails with a not-found error; add an acceptance test for validation behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/framework/objects/partial_notification/schema.go | Updates notification_type description to include Slack V2 (type 5). |
| pkg/framework/objects/partial_notification/resource.go | Adds Slack V2 required-field validation and augments error details for type 5 failures. |
| pkg/framework/objects/notification/schema.go | Updates notification_type description to include Slack V2 (type 5). |
| pkg/framework/objects/notification/resource.go | Adds Slack V2 required-field validation and augments error details for type 5 failures. |
| pkg/framework/objects/notification/resource_acceptance_test.go | Adds an acceptance test for config-time validation scenarios. |
| examples/resources/dbtcloud_notification/resource.tf | Adds an example of Slack V2 notification configuration. |
| docs/resources/partial_notification.md | Updates generated docs text for notification_type to include Slack V2 (type 5). |
| docs/resources/notification.md | Adds Slack V2 example and updates docs text for notification_type to include Slack V2 (type 5). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
Users were unaware of how to use the TF provider to provision Slack V2 notifications.
Solution:
Add documentation for Slack V2 and validations for the required fields to
dbtcloud_notificationanddbtcloud_partial_notification.