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

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

variable "application_family" {
  default = "user-platform"
}

variable "service_name" {
  default = "gda-signup-api"
}

variable "team_name" {
  description = "Team Name"
  type        = string
  default     = "accounts-platform"
}

variable "lambda_name" {
  default = "lambda-gda-signup"
}

variable "lambda_handler" {
  default = "src.app.handler"
}

variable "lambda_provisioned_concurrent_executions" {
  default = 1
}

variable "msk_cluster_name" {
  description = "MSK cluster name to read from."
  default     = "qa-managed-kafka-artist-diy"
}

variable "kafka_topic" {
  description = "Kafka topic to send messages to."
  default     = "event.gdaSubmitApplication"
}

variable "salesforce_record_type_id" {
  description = "Salesforce record type id"
  default     = "0124W0000007nnYQAQ"
}

variable "datadog_advanced_enabled" {
  description = "Enabled DataDog monitoring."
  default     = true
}

variable "auth0_authorizer_issuer" {
  description = "Auth0 tenant URL"
  default     = "https://qa-orchard.auth0.com/"
}

variable "auth0_authorizer_audience" {
  description = "Auth0 audience"
  default     = "https://qa-gda-gateway-auth0-jwt-authorizer"
}

variable "domain_name" {
  description = "Domain name for the API Gateway"
  default     = "qa-gda-gateway.theorchard.io"
}

variable "acm_certificate_domain" {
  description = "ACM certificate domain for the API Gateway"
  default     = "*.theorchard.io"
}

variable "route53_zone_name" {
  description = "Route53 zone name for the API Gateway domain"
  default     = "theorchard.io"
}

variable "dlq_enabled" {
  description = "Enable lambda DLQ"
  default     = true
}

variable "api_gateway_access_logs_enabled" {
  description = "Enable API Gateway access logs."
  default     = true
}

variable "datadog_function_destination_lambda_name" {
  description = "Name of datadog function for shipping cloudwatch logs"
  default     = "DatadogLambdaFunction"
}

variable "datadog_p90_monitor_threshold" {
  description = "DataDog Api Gateway p90 latency monitor threshold"
  default     = "3000"
}

variable "datadog_log_monitor_threshold" {
  description = "DataDog Api Gateway 401 log monitor threshold"
  default     = "12"
}

variable "datadog_error_monitor_threshold" {
  description = "DataDog Api Gateway error monitor threshold"
  default     = "0.05"
}

variable "datadog_notification_endpoints_none" {
  description = "DataDog notification endpoints - no notifications for qa."
  default     = ""
}

variable "datadog_notification_endpoints" {
  description = "DataDog notification endpoints - for log alert only in qa."
  default     = "@slack-accounts-team-alerts"
}

locals {
  datadog_function_destination_arn = "arn:aws:lambda:${var.aws_region}:${data.aws_caller_identity.current.account_id}:function:${var.datadog_function_destination_lambda_name}"
}
