variable "env" {
  description = "prod, qa or dev"
  default     = "dev"
}

variable "lambda_name" {
  description = "AWS Lambda function name"
  default     = "dd-search"
}

variable "lambda_function_environment_variables" {
  description = "Lambda function environment variables"
  type        = map(string)

  default = {
    Environment            = "dev"
    LOGGER_LEVEL           = "DEBUG"
    SENTRY_DSN             = ""
    LOGGER_DSN             = ""
    AR_MYSQL_USER          = ""
    AR_MYSQL_PASSWORD      = ""
    AR_MYSQL_HOST          = ""
    AR_MYSQL_PORT          = 3306
    DD_MYSQL_HOST          = ""
    DD_MYSQL_PORT          = 3306
    DD_MYSQL_USER          = ""
    DD_MYSQL_PASSWORD      = ""
    ELASTICSEARCH_HOST     = ""
    ELASTICSEARCH_USE_SSL  = ""
    ELASTICSEARCH_PORT     = 80
    ELASTICSEARCH_USE_AUTH = "True"
    SNS_TARGET_ARN         = ""
  }
}

variable "lambda_function_handler" {
  description = "Lambda function handler/entrypoint"
  default     = "index.handler"
}

variable "lambda_function_timeout" {
  description = "Lambda fucntion timeout, in seconds"
  default     = "300"
}

variable "lambda_function_concurrent_executions" {
  description = "The amount of reserved concurrent executions for this lambda function"
  default     = 3
}

variable "lambda_function_memory_size" {
  description = "Amount of memory in MB lambda function can use at runtime"
  default     = 128
}

variable "lambda_function_package_path" {
  description = "Path to lambda funtion. This should only be a dummy zip"
  default     = "lambda.zip"
}

variable "vpc_security_group_ids" {
  description = "Security groups for lambda function"
  type        = list(string)
  default     = ["sg-351b5751"]
}

variable "vpc_subnet_ids" {
  description = "Subnets in which to run lambda"
  type        = list(string)
  default     = ["subnet-44c19a21", "subnet-b649dfef"]
}

variable "kinesis_stream_name" {
  description = "AWS Kinesis stream name"
}

variable "kinesis_batch_size" {
  description = "AWS Kinesis batch size"

  # Use a small default value not to exceed Kinesis TTL with slow Lambda.
  default = 1
}

