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

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

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 "route53_zone" {
  type        = string
  description = "The name of the Route 53 zone"
  default     = "shared.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     = "@slack-devops"
}

# Prefix lists for LB access
variable "prefix_lists_to_allow_ingress_to_lb" {
  type = set(string)
  default = [
    "dev-orcd-private-subnet-prefix-list",
    "prod-orcd-private-subnet-prefix-list",
    "prod-accounting-private-subnet-prefix-list",
    "qa-accounting-private-subnet-prefix-list",
    "vpn-ny",
    "vpn-ny-users",
  ]
}

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

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.medium.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     = 2
}

variable "fqdn" {
  type        = string
  description = "The fully qualified domain name for the service"
  default     = "chef.theorchard.io"
}

variable "team_name" {
  type        = string
  description = "The team responsible for this service"
  default     = "devops"
}
