provider "aws" {
  region = "us-east-1"
}

# Terraform backends cannot contain interpolations
terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/rbencoder/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

module "rbencoder_httpd_process_monitor" {
  source = "git@github.com:theorchard/terraform-datadog.git//modules/process"

  environment                       = "prod"
  service_name                      = "vector_rbencoder"
  tag_based_alert_enabled           = true
  process_name                      = "httpd.exe"
  process_query_tags                = "service_name:vector_rbencoder, environment:prod"
  threshold_warning                 = 2
  threshold_critical                = 1
  notification_endpoints            = "@slack-monitoring @pagerduty-Datadog"
  escalation_notification_endpoints = "@slack-monitoring @pagerduty-Datadog"
}
