Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 2.08 KB

File metadata and controls

65 lines (48 loc) · 2.08 KB
page_title dbtcloud_model_notifications Resource - dbtcloud
subcategory
description Configure model notifications for a dbt Cloud environment. By default all the on_... are set to false. When destroyed, the model notifications are disabled.

dbtcloud_model_notifications (Resource)

Configure model notifications for a dbt Cloud environment. By default all the on_... are set to false. When destroyed, the model notifications are disabled.

Example Usage

resource "dbtcloud_model_notifications" "prod_model_notifications" {
  environment_id = dbtcloud_environment.prod_environment.environment_id
  enabled        = true
  on_success     = false
  on_failure     = true
  on_warning     = true
}

Schema

Required

  • environment_id (String) The ID of the dbt Cloud environment

Optional

  • enabled (Boolean) Whether model notifications are enabled for this environment
  • on_failure (Boolean) Whether to send notifications for failed model runs
  • on_skipped (Boolean) Whether to send notifications for skipped model runs
  • on_success (Boolean) Whether to send notifications for successful model runs
  • on_warning (Boolean) Whether to send notifications for model runs with warnings
  • resource_metadata (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.

Read-Only

  • id (String) The internal ID of the model notifications configuration

Import

Import is supported using the following syntax:

# Model notifications are imported using the environment ID where the notifications are enabled
# Using import blocks (requires Terraform >= 1.5)
import {
  to = dbtcloud_model_notifications.my_model_notifications
  id = "environment_id"
}

import {
  to = dbtcloud_model_notifications.my_model_notifications
  id = "12345"
}

# Using the older import command
terraform import dbtcloud_model_notifications.my_model_notifications "environment_id"
terraform import dbtcloud_model_notifications.my_model_notifications 12345