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

variable "application_family" {
  description = "family of applications this lambda belongs to"
  default     = "podcast"
}

variable "vpc_id" {
  default = "vpc-7f0e841a"
}

variable "vpc_subnet_ids" {
  type        = list(string)
  description = "VPC subnet IDs where the lambdas will execute"
}

variable "input_bucket_name" {
}

variable "preview_buckets_names" {
  description = "Bucket for storing image thumbnails (includes the environment prefix)"
  type        = list(string)
}

variable "output_buckets_names" {
  description = "Buckets for storing output assets"
  type        = list(string)
}

variable "lambda_default_timeout" {
  description = "Default value for timeout"
  default     = "300"
}

variable "iam_policy_file_location" {
  default = "../modules/lambdas/policies"
}

# Custom memory size for image encoding, which is needed because that lambda's memory usage
# can exceed the default limit of 128 MB. Variables for other lambdas can be added as needed.
variable "image_encoding_lambda_memory_size" {
  description = "Memory size for the image encoding lambda function"
  default     = "3008"
}

variable "image_validation_lambda_memory_size" {
  description = "Memory size for the image validation lambda function"
  default     = "512"
}

variable "audio_validation_lambda_memory_size" {
  description = "Memory size for the audio validation lambda function"
  default     = "512"
}

variable "audio_waveform_lambda_memory_size" {
  description = "Memory size for the audio waveform lambda function"
  default     = "512"
}

variable "audio_waveform_lambda_execution_time" {
  description = "Execution time for the audio waveform lambda function"
  default     = "900"
}

variable "lambda_concurrent_executions" {
  description = "Number of reserved concurrent executions for lambda function"
  default     = 5
}

variable "datadog_enabled" {
  description = "Whether or not to attach datadog secretsmanager IAM policy"
  default     = true
}

variable "output_buckets_readwrite_policy_arn" {
  description = "ARN of readwrite policy to output buckets asset-transcoder writes to"
}

variable "lambda_additional_environment_variables" {
  type        = map(string)
  description = "Additional environment variables to add to each lambda"
  default     = {}
}
