variable "aws_region" {
  default     = "us-east-1"
  description = "Which AWS region to spin up the environment in"
}

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

variable "lambda_name" {
  default = "agg-n-copy-data-from-sf-to-mysql"
}

variable "application_family" {
  default = "apollo"
}

variable "sentry_organization" {
  description = "The slug of the organization."
  default     = "the-orchard"
}

variable "sentry_teams" {
  description = "(Set of string) Team assignment to the sentry project"
  default     = ["apollo"]
}

variable "sentry_platform" {
  description = "Python (python-flask, python-awslambda, python) Java, PHP"
  default     = "python-awslambda"
}

variable "secrets_manager_secret_names" {
  description = "List of secrets for apollo-api ecs service."
  type        = list(string)
  default = [
    "MYSQL_PASSWORD",
    "SNOWFLAKE_PASSWORD",
  ]
}

variable "slack_organization_name" {
  description = "The name of the Slack organization."
  default     = "The Orchard"
}

variable "slack_channel_name" {
  description = "The name of the Slack channel."
  default     = "apollo-errors-be-prod"
}

variable "slack_channel_id" {
  description = "The id of the Slack channel."
  default     = "C05RM0HAZNF"
}

variable "notification_tags" {
  description = "The list of tags that will be shown in notification."
  default     = ["environment", "user", "url", "browser", "device", "os", "transaction"]
}

variable "aws_cloudwatch_logs_retentions_in_days" {
  default = 365
}

locals {
  name_prefix  = lower("${var.environment}-${var.application_family}")

  account_id      = data.aws_caller_identity.current.account_id
  policy_base_arn = "arn:aws:iam::${local.account_id}:policy/${local.name_prefix}"

  default_tags = {
    platform           = "Apollo"
    environment        = "Production"
    platform_with_env  = "Apollo Production"
    managed_by         = "Terraform"
    application_family = "apollo"
  }

  aggregated_tag = "APL_PROD"
}
