# ----------------------------------- # GENERAL BLOCKS # ----------------------------------- variable "region" { description = "AWS resource region" type = string } # ----------------------------------- # NAMING BLOCKS # ----------------------------------- variable "security" { type = string description = "The urbassec zone of the account" validation { condition = var.security == lower(var.security) error_message = "The subnet zone must be in lowercase." } validation { condition = can(regex("^z[0-2]?[0-9]$", var.security)) error_message = "The subnet zone must be in format: zi (^z[0-2]?[0-9]$)." } } variable "environment" { type = string description = "The environment name: plg/dev/npd/ppd/prd." validation { condition = contains(["plg", "dev", "npd", "ppd", "prd"], var.environment) error_message = "The environment must be a valide value or empty: plg/dev/npd/ppd/prd." } } # ----------------------------------- # TAG MANDATORY BLOCKS # ----------------------------------- variable "company" { type = string description = "The trigram of the company." validation { condition = length(var.company) == 3 error_message = "The company is mandatory and must be a trigram." } validation { condition = var.company == lower(var.company) error_message = "The company must be in lowercase." } } variable "service_id" { type = string description = "The service portfolio or serviceID." validation { condition = length(var.service_id) <= 50 error_message = "The serviceID must be a less than 50 characters." } validation { condition = var.service_id == lower(var.service_id) error_message = "The serviceID must be in lowercase." } } variable "appname" { type = string description = "Application name" } variable "tags" { description = "A map of tags to add to all resources" type = map(string) default = {} } variable "management" { description = "IaC repository identification" type = string default = "terraform" } # ----------------------------------- # Apigateway # ----------------------------------- variable "xray_tracing_enabled" { description = "A flag to indicate whether to enable X-Ray tracing." type = bool default = false } # ----------------------------------- # APPLICATION VARIABLES BLOCKS # ----------------------------------- variable "http_proxy" { description = "HTTP Proxy" type = string } variable "https_proxy" { description = "HTTPS Proxy" type = string } variable "no_proxy" { description = "HTTPS Proxy no proxy" type = string } # ----------------------------------- # ECS TASK DEFINITION # ----------------------------------- variable "task_defintion_cpu" { description = "Task definition CPU" type = number default = 1024 } variable "task_definition_memory" { description = "Task definition Memory" type = number default = 2048 } variable "llm_model_id" { description = "Bedrock LLM model id" type = string } variable "embeddings_model_id" { description = "Embeddings model id" type = string } variable "num_workers" { description = "Number of workers to run" type = number default = 10 } variable "bedrock_region" { description = "BEDROCK region to use" type = string default = "eu-west-3" } # ----------------------------------- # Logging # ----------------------------------- variable "log_level" { description = "Log Level" type = string default = "info" } # ----------------------------------- # Lambda # ----------------------------------- variable "lambda_memory" { description = "Lambda memory size" type = number default = 512 } variable "lambda_timeout" { description = "Lambda timeout" type = number default = 120 } # ----------------------------------- # Cognito # ----------------------------------- variable "redirect_uri" { description = "identity provider" type = string }