variable "aws_region" {
  default     = "us-east-1"
  description = "AWS region"
}

variable "config_s3_bucket" {
  description = "S3 bucket where encrypted content is stored"
  default     = "nickelback"
}

variable "config_service_name" {
  description = "Service name for config locations"
  default     = "orchard-repo-cron-worker"
}

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

variable "service_name" {
  default = "hfa"
}

variable "team_name" {
  default = "appsec"
}

variable "application_family" {
  default = "php-monolith"
}

variable "efs_volume_container_path" {
  description = "Path inside container to mount EFS volume"
  default     = "/mnt/outfile"
}

locals {
  service_name_to_queue_map = {
    "hfa-cron-invoice" = {
      service_name     = "hfa-cron-invoice"
      schedule_enabled = true
      schedule         = "cron(0 8 * * ? *)"
      script_arguments = "invoice"
      script_to_run    = "scripts/Publishing/Hfa/HfaCron.php"
    }
    "hfa-cron-invoice-theorchard" = {
      service_name     = "hfa-cron-invoice-theorchard"
      schedule_enabled = true
      schedule         = "cron(0 8 * * ? *)"
      script_arguments = "invoice /var/www/html/application/configs/hfacron/"
      script_to_run    = "scripts/Publishing/Hfa/HfaCron.php"
    }
    "hfa-cron-response" = {
      service_name     = "hfa-cron-response"
      schedule_enabled = true
      schedule         = "cron(0 10 * * ? *)"
      script_arguments = "response"
      script_to_run    = "scripts/Publishing/Hfa/HfaCron.php"
    }
    "hfa-escrow-release" = {
      service_name     = "hfa-escrow-release"
      schedule_enabled = true
      schedule         = "rate(1 hour)"
      script_arguments = ""
      script_to_run    = "scripts/Publishing/hfa_escrow_release.php"
    }
    "hfa-usage-reports" = {
      service_name     = "hfa-usage-reports"
      schedule_enabled = false # Only runs from https://scheduler.theorchard.io/job/05_HFA_usage_reports/
      schedule         = ""
      script_arguments = "PROVIDED_BY_JENKINS"
      script_to_run    = "scripts/Publishing/hfa_usage_process.php"
    }
  }
}
