variable "project_name" {
  description = "Name of the project"
  type        = string
  default     = "mockupaws"
}

variable "environment" {
  description = "Environment name (dev, staging, prod)"
  type        = string
  default     = "production"
}

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

variable "vpc_cidr" {
  description = "CIDR block for VPC"
  type        = string
  default     = "10.0.0.0/16"
}

variable "availability_zones" {
  description = "List of availability zones"
  type        = list(string)
  default     = ["us-east-1a", "us-east-1b", "us-east-1c"]
}

#------------------------------------------------------------------------------
# Database Variables
#------------------------------------------------------------------------------

variable "db_instance_class" {
  description = "RDS instance class"
  type        = string
  default     = "db.r6g.large"
}

variable "db_allocated_storage" {
  description = "Initial storage allocation for RDS (GB)"
  type        = number
  default     = 100
}

variable "db_max_allocated_storage" {
  description = "Maximum storage allocation for RDS (GB)"
  type        = number
  default     = 500
}

variable "db_multi_az" {
  description = "Enable Multi-AZ for RDS"
  type        = bool
  default     = true
}

variable "db_backup_retention_days" {
  description = "Backup retention period in days"
  type        = number
  default     = 30
}

#------------------------------------------------------------------------------
# ElastiCache Variables
#------------------------------------------------------------------------------

variable "redis_node_type" {
  description = "ElastiCache Redis node type"
  type        = string
  default     = "cache.r6g.large"
}

variable "redis_num_cache_clusters" {
  description = "Number of cache clusters (nodes)"
  type        = number
  default     = 2
}

#------------------------------------------------------------------------------
# ECS Variables
#------------------------------------------------------------------------------

variable "ecs_task_cpu" {
  description = "CPU units for ECS task (256 = 0.25 vCPU)"
  type        = number
  default     = 1024
}

variable "ecs_task_memory" {
  description = "Memory for ECS task (MB)"
  type        = number
  default     = 2048
}

variable "ecs_desired_count" {
  description = "Desired number of ECS tasks"
  type        = number
  default     = 3
}

variable "ecs_max_count" {
  description = "Maximum number of ECS tasks"
  type        = number
  default     = 10
}

variable "ecr_repository_url" {
  description = "URL of ECR repository for backend image"
  type        = string
}

#------------------------------------------------------------------------------
# Domain & SSL Variables
#------------------------------------------------------------------------------

variable "domain_name" {
  description = "Primary domain name"
  type        = string
}

variable "certificate_arn" {
  description = "ARN of ACM certificate for SSL"
  type        = string
}

variable "create_route53_zone" {
  description = "Create new Route53 zone (false if using existing)"
  type        = bool
  default     = false
}

variable "hosted_zone_id" {
  description = "Route53 hosted zone ID (if not creating new)"
  type        = string
  default     = ""
}

#------------------------------------------------------------------------------
# Alerting Variables
#------------------------------------------------------------------------------

variable "alert_email" {
  description = "Email address for alerts"
  type        = string
}

variable "pagerduty_key" {
  description = "PagerDuty integration key (optional)"
  type        = string
  default     = ""
}
