variable "application_family" {
  description = "This is the application family according to AWS"
  default = "accounting"
}

variable "environment" {
  description = "Available values:  dev, qa, prod."
  default     = "prod"
}

variable "custom_reports_monitor_message" {
  default = "{{#is_alert}}\n🚨 Customers are unable to get their Custom Reports on **{{resource_name.name}}**. This is **mission critical**. Can some kindly triage this bug?\n{{/is_alert}}\n\n{{#is_warning}}\n⚠️ This is a warning. Some of our customers are unable to download/fetch their custom reports. Please take a look at this resource: **{{resource_name.name}}**.\n{{/is_warning}}\n\n{{#is_recovery}}\n✅ Customers are now back to receiving their custom reports! 🚀\n{{/is_recovery}} \n\n"
}

variable "custom_reports_monitor_escalation_message" {
  default = "🚨ESCALATION MESSAGE🚨: Customers are unable to receive their custom reports. This is a **production outage** on {{span.service}} !\nCan we get all hands on deck to resolve this ASAP? This is mission critical 🚨.\n\n"
}

variable "escalation_endpoints" {
  description = "DataDog escalation notification endpoints"
  default     = "@slack-accounting-outage @slack-accounting-tech @slack-moneyhub @oncall-accounting @oncall-devops"
}

variable "five_hundred_resource_monitor_message" {
  default = "{{#is_alert}}\n🚨 We are getting a high rise in **5xx response status codes** on **{{resource_name.name}}**. Can some kindly triage the cause of this spike in 5xx status codes?\n{{/is_alert}} \n\n{{#is_warning}}\n⚠️ This is a warning. Our 5xx status codes have increased in the last 5 mins on **{{resource_name.name}}**. Please take a look at this resource.\n{{/is_warning}} \n\n\n{{#is_recovery}}\n✅ We are now back to normal! 🚀\n{{/is_recovery}}"
}

variable "five_hundred_resource_monitor_escalation_message" {
  default = "{{#is_alert}}\n🚨 Escalation Alert: We are still getting a high rise in **500 response status codes** on {{resource_name.name}}. Can someone take a look into this ASAP?\n{{/is_alert}} \n\n"
}

variable "five_hundred_resource_monitor_statement_periods_message" {
  default = "{{#is_alert}}\n🚨 We are getting a high rise in **5xx response status codes** on **GET /statement-periods endpoint**. Can some kindly triage the cause of this spike in 5xx status codes?\n{{/is_alert}} \n\n{{#is_warning}}\n⚠️ This is a warning. Our 5xx status codes have increased in the last 5 mins on **GET /statement-periods endpoint**. Please take a look at this resource.\n{{/is_warning}} \n\n\n{{#is_recovery}}\n✅ We are now back to normal! 🚀\n{{/is_recovery}}"
}

variable "five_hundred_resource_monitor_statement_periods_escalation_message" {
  default = "{{#is_alert}}\n🚨 Escalation Alert: We are still getting a high rise in **500 response status codes** on GET /statement-periods endpoint. Can someone take a look into this ASAP?\n{{/is_alert}} \n\n"
}

variable "five_hundred_resource_monitor_reference_signing_entity_message" {
  default = "{{#is_alert}}\n🚨 We are getting a high rise in **5xx response status codes** on **GET /reference-signing-entity endpoint**. Can some kindly triage the cause of this spike in 5xx status codes?\n{{/is_alert}} \n\n{{#is_warning}}\n⚠️ This is a warning. Our 5xx status codes have increased in the last 5 mins on **GET /reference-signing-entity endpoint**. Please take a look at this resource.\n{{/is_warning}} \n\n\n{{#is_recovery}}\n✅ We are now back to normal! 🚀\n{{/is_recovery}}"
}

variable "five_hundred_resource_monitor_reference_signing_entity_escalation_message" {
  default = "{{#is_alert}}\n🚨 Escalation Alert: We are still getting a high rise in **500 response status codes** on GET /reference-signing-entity endpoint. Can someone take a look into this ASAP?\n{{/is_alert}} \n\n"
}

variable "gateway_timeout_resource_monitor_message" {
  default = "{{#is_alert}}\n🚨 We are getting a high rise in **504 response status codes** on **{{resource_name.name}}**. Can some kindly triage the cause of this spike in 504 status codes?\n{{/is_alert}} \n\n{{#is_warning}}\n⚠️ This is a warning. Our 504 status codes have increased in the last 5 mins on **{{resource_name.name}}**. Please take a look at this resource.\n{{/is_warning}} \n\n\n{{#is_recovery}}\n✅ We are now back to normal! 🚀\n{{/is_recovery}}"
}

variable "gateway_timeout_resource_monitor_escalation_message" {
  default = "{{#is_alert}}\n🚨 Escalation Alert: We are still getting a high rise in **504 response status codes** on {{resource_name.name}}. Can someone take a look into this ASAP?\n{{/is_alert}} \n\n"
}

variable "latency_p75_monitor_message" {
  default = "{{#is_alert}}\n🚨Our customers are experiencing a degradation in page load times. \nThree-quarters of the requests going to the service are completed within **{{threshold}} seconds** or less, while the remaining 25% may experience longer response times.\nCan someone investigate this please?\n{{/is_alert}} \n\n{{#is_warning}}\n ⚠️ Our page loads are beginning to slow down to {{warn_threshold}} seconds.\nThree-quarters of the requests going to the service are completed within **{{warn_threshold}} seconds** or less, while the remaining 25% may experience longer response times.\nCan someone take a look into this please?\n{{/is_warning}} \n\n{{#is_recovery}}\n✅ Latency times are now back to normal.\n{{/is_recovery}} \n\n"
}

variable "latency_p95_monitor_message" {
  default = "{{#is_alert}}\n🚨Our customers are experiencing a degradation in page load times. \n95% of the requests going to the service are completed within **{{threshold}} seconds** or less, while the remaining 5% may experience longer response times.\nCan someone investigate this please?\n{{/is_alert}} \n\n{{#is_warning}}\n ⚠️ Our page loads are beginning to slow down to {{warn_threshold}} seconds.\n95% of the requests going to the service are completed within **{{warn_threshold}}  seconds** or less, while the remaining 5% may experience longer response times.\nCan someone take a look into this please?\n{{/is_warning}} \n\n{{#is_recovery}}\n✅ Latency times are now back to normal.\n{{/is_recovery}} \n\n"
}

variable "notification_main_endpoint" {
  description = "DataDog notification endpoints"
  default     = "@slack-moneyhub"
}

variable "notification_alerts_endpoint" {
  description = "DataDog notification endpoints"
  default     = "@slack-moneyhub-alerts"
}

variable "security_monitor_message" {
  default = "{{#is_alert}}\n🚨There is an alarming high number of unauthorised requests hitting `ows-moneyhub`. This is a **security alert** and should be investigated urgently.\n{{/is_alert}} \n\n{{#is_warning}}\n⚠️ Something suspicious seems to be going on in {{env.prod}}. Is anyone available to investigate?\n{{/is_warning}} \n\n{{#is_recovery}}\n✅ Suspicious activity raised by the security monitor has recovered.\n{{/is_recovery}} \n\n"
}

variable "security_monitor_escalation_message" {
  default = "{{#is_alert}}\n🚨Escalation message 🚨: There is an alarmingly high number of unauthorised requests hitting `ows-moneyhub`. This is a **security alert** and should be investigated **URGENTLY**.\n{{/is_alert}} \n\n"
}

variable "statement_attachments_monitor_message" {
  default = "{{#is_alert}}\n🚨Our customers are unable to fetch/create Statement Attachments. This is **mission critical** for us. Can someone urgently look into this ASAP please?\n{{/is_alert}} \n\n{{#is_warning}}\n⚠️ Warning ⚠️. Some customers are experiencing difficulty creating/fetching Statement Attachments.\n{{/is_warning}} \n\n{{#is_recovery}}\n✅ Statement Attachments monitor back to normal. 🚀\n{{/is_recovery}} \n\n"
}

variable "statement_attachments_monitor_escalation_message" {
  default = "🚨ESCALATION 🚨: We have a production outage. Our Customers are still unable to get or create Statement Attachments. \nThis is mission critical! Can we get ALL hands on deck please?\n\n"
}

variable "service_name" {
  default = "ows-moneyhub"
}

variable "team_name" {
  default = "Customer Accounting"
}

variable "team_handle" {
  default = "accounting"
}

variable "team_members" {
  default = [
    "jviletto",
    "kgreenidge",
    "menger",
    "oyatsuk"
  ]
}

variable "dependent_applications" {
  default = ["collaborator-suite", "moneyhub", "royalties"]
}

