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

variable "environment" {
  type        = string
  description = "The environment"
  default     = "dev"
}

variable "service_name" {
  type        = string
  description = "The name of the service."
  default     = "chef-server"
}

variable "application_family" {
  type        = string
  description = "The name of the application family."
  default     = "devops"
}

variable "vpc_name" {
  type        = string
  description = "The name of the VPC"
  default     = "dev"
}

variable "subnet_name_filter" {
  type        = string
  description = "A pattern matching the names of the subnets to use"
  default     = "private0*"
}

variable "route53_zone" {
  type        = string
  description = "The name of the Route 53 zone"
  default     = "dev.theorchard.io"
}

variable "secrets_manager_secret_names" {
  type        = list(string)
  description = "List of Secrets Manager secrets"
  default = [
    "ADMIN_USER_PASSWORD",
    "COOKBOOK_STORAGE_ACCESS_KEY_ID",
    "COOKBOOK_STORAGE_SECRET_ACCESS_KEY",
    "OPENSEARCH_PASSWORD",
    "POSTGRES_PASSWORD",
  ]
}

variable "chef_server_persistent_directories" {
  type = map(object({
    dir = string
  }))
  description = "Persistent directories for the Chef Server container"
  default = {
    certificates = {
      dir = "/etc/cinc-project"
    }
    data = {
      dir = "/var/opt/cinc-project"
    }
  }
}

variable "notification_endpoints" {
  type        = string
  description = "Endpoints for Datadog notifications"
  default     = ""
}

# Opensearch configuration
variable "opensearch_instance_count" {
  type        = number
  description = "The number of instances for the opensearch cluster"
  default     = 1
}

variable "opensearch_disk_size" {
  type        = number
  description = "The disk size for the opensearch instances"
  default     = 10
}

variable "opensearch_instance_type" {
  type        = string
  description = "The instance type for the opensearch instances"
  default     = "t3.small.search"
}

# RDS configuration
variable "rds_instance_type" {
  type        = string
  description = "The instance type for the RDS cluster"
  default     = "db.t4g.medium"
}

variable "rds_cluster_instance_count" {
  type        = number
  description = "The number of instances for the RDS cluster"
  default     = 1
}

variable "rds_db_subnet_group_name" {
  type        = string
  description = "The name of the RDS subnet group"
  default     = "private_rds_subnet_group"
}
