Skip to content

Commit

Permalink
#3950: Added documentation for the data source.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomez04 committed Oct 9, 2024
1 parent a1da23e commit 5cd4114
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/data-sources/notification_destinations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
subcategory: "Workspace"
---
# databricks_notification_destination Data Source

-> **NOTE** Ensure that the notification destinations you are attempting to retrieve have been created and are accessible within your workspace.

This data source allows you to retrieve information about [Notification Destinations](https://docs.databricks.com/api/workspace/notificationdestinations). Notification Destinations are used to send notifications for query alerts and jobs to external systems such as email, Slack, Microsoft Teams, PagerDuty, or generic webhooks.

## Example Usage


```hcl
resource "databricks_notification_destination" "email" {
display_name = "Email Destination"
config {
email {
addresses = ["[email protected]"]
}
}
}
resource "databricks_notification_destination" "slack" {
display_name = "Slack Destination"
config {
slack {
url = "https://hooks.slack.com/services/..."
}
}
}
data "databricks_notification_destinations" "this" {} # Lists all notification desitnations
data "databricks_notification_destinations" "filtered_notification" {
display_name_contains = "Destination"
type = "EMAIL"
}
```


## Argument Reference

The following arguments are supported:

* `display_name_contains` - (Optional) A substring to filter Notification Destinations by their display name.
* `type` - (Optional) The type of the Notification Destination to filter by. Valid values are:
* `EMAIL` - Filters Notification Destinations of type Email.
* `MICROSOFT_TEAMS` - Filters Notification Destinations of type Microsoft Teams.
* `PAGERDUTY` - Filters Notification Destinations of type PagerDuty.
* `SLACK` - Filters Notification Destinations of type Slack.
* `WEBHOOK` - Filters Notification Destinations of type Webhook.

## Attribute Reference

In addition to all arguments above, the following attributes are exported:
* `notification_destinations` - A list of Notification Destinations matching the specified criteria. Each element contains the following attributes:
* `id` - The unique ID of the Notification Destination.
* `display_name` - The display name of the Notification Destination.
* `destination_type` - The type of the notification destination. Possible values are `EMAIL`, `MICROSOFT_TEAMS`, `PAGERDUTY`, `SLACK`, or `WEBHOOK`.

0 comments on commit 5cd4114

Please sign in to comment.