provider "snowflake" {
  account_name = var.account
  role         = "PROD_ATLANTIS"
  preview_features_enabled = [
    "snowflake_email_notification_integration_resource",
  ]
}

terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/snowflake/delphi/notification-integrations/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

resource "snowflake_email_notification_integration" "task_failure_email_tech_integration" {
  name               = "TASK_FAILURE_EMAIL_TECH_INTEGRATION"
  comment            = "Email integration for task failure alerts"
  enabled            = true
  allowed_recipients = var.task_failure_email_tech_integration_recipients
}
