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

variable "environment" {
  default = "prod"
}

variable "service_name" {
  default = "twilio-webhooks-inbound"
}

variable "application_family" {
  default = "fansifter"
}

variable "lambda_name" {
  default = "lambda-audience-twilio-webhooks-inbound"
}

variable "lambda_timeout" {
  default = 5 * 60
}

variable "lambda_reserved_concurrency" {
  default = 10
}

variable "lambda_memory_size" {
  default = 256
}

variable "domain_name" {
  description = "Domain name for an ALB"
  default     = "theorchard.io"
}

variable "public_domain_name" {
  description = "Domain name for a Cloudflare record pointing at ALB"
  default     = "theorchard.com"
}

variable "secrets_manager_secret_names" {
  description = "List of secrets manager secrets to create."
  type        = list(string)
  default = [
    "RDS_DB_PASSWORD",
  ]
}

variable "postgres_host" {
  default = "prod-ows-dmp.cluster-cb22xqmk0y0q.us-east-1.rds.amazonaws.com"
}

variable "postgres_port" {
  default = "5432"
}

variable "postgres_name" {
  default = "ows_dmp"
}

variable "postgres_username" {
  default = "twilio_webhooks_inbound"
}

locals {
  route53_zone                      = "${var.environment}-fansifter.theorchard.io"
  load_balancer_name                = "${var.environment}-fansifter-twilio-webhooks"
  postgres_password_secret_name     = "${var.environment}/${var.lambda_name}/RDS_DB_PASSWORD"


  tags = {
    environment        = var.environment
    application_family = var.application_family
    service_name       = var.lambda_name
    terraformed        = true
    eiso-exception     = "aws.08.30"
  }
}
