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

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

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

variable "lambda_name" {
  description = "Name of service"
  default     = "lambda-auth0-m2m-token-secret-rotation"
}

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

variable "lambda_function_reserved_concurrent_executions" {
  description = "Number of reserved concurrent executions for lambda function"
  default     = 10
}

variable "additional_tags" {
  description = "Additional tags"
  type        = map(string)
  default = {
    team = "permissions-platform"
  }
}

locals {
  datadog_tags = flatten([
    "environment:${var.environment}",
    "service_name:${var.lambda_name}",
    "team:permissions-platform",
  ])
}

variable "notification_endpoints" {
  description = "Endpoints for alerts. Can be email, slack, pagerduty, etc"
  default     = "@slack-permissions-platform-alerts"
}

variable "lambda_throttle_time" {
  description = "Represent the lambda throttle time"
  default     = "last_1h"
}

variable "lambda_throttle_warning_number" {
  description = "Number of throttle warning alerts"
  default     = 0.5
}

variable "lambda_throttle_warning_recovery_number" {
  description = "Number representing throttle warning recovery status"
  default     = 0.3
}

variable "lambda_throttle_critical_number" {
  description = "Number of throttle critical alerts"
  default     = 1
}

variable "lambda_throttle_critical_recovery_number" {
  description = "Number of throttle critical recovery alerts"
  default     = 0.1
}

variable "lambda_throttle_ok_number" {
  description = "Number of throttle that are ok"
  default     = 0
}
