variable "aws_region" {
  description = "AWS region to deploy resources"
  type        = string
  default     = "eu-central-1"
}

variable "aws_profile" {
  description = "AWS CLI profile to use"
  type        = string
}

variable "project_name" {
  description = "Project name for resource tagging and naming"
  type        = string
  default     = "{{ app_name }}"
}

variable "environment" {
  description = "Environment name (sandbox, prod)"
  type        = string
}

# --- Networking ---

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

variable "allowed_ingress_cidrs" {
  description = "CIDR blocks allowed to access the instance (VPN server IPs)"
  type        = list(string)
}

# --- Compute ---

variable "instance_type" {
  description = "EC2 instance type"
  type        = string
  default     = "t3.medium"
}

variable "ami_id" {
  description = "AMI ID for the EC2 instance (Ubuntu 22.04)"
  type        = string
}

variable "key_name" {
  description = "Name of the SSH key pair"
  type        = string
}

# {{# if_rds }}
# --- Database ---

variable "db_instance_class" {
  description = "RDS instance class"
  type        = string
  default     = "db.t4g.micro"
}

variable "db_name" {
  description = "Name of the PostgreSQL database"
  type        = string
  default     = "{{ app_name }}"
}

variable "db_username" {
  description = "Master username for the RDS instance"
  type        = string
  default     = "{{ app_name }}"
}

variable "db_allocated_storage" {
  description = "Allocated storage in GB for the RDS instance"
  type        = number
  default     = 20
}

variable "db_backup_retention_period" {
  description = "Number of days to retain automated backups"
  type        = number
  default     = 7
}
# {{/ if_rds }}

# {{# if_ses }}
# --- SES ---

variable "ses_domain" {
  description = "SES verified domain for sending email"
  type        = string
}

# --- Secrets (user-provided, stored in SSM Parameter Store) ---

variable "ses_smtp_user" {
  description = "SES SMTP username — provide on first apply via -var"
  type        = string
  sensitive   = true
}

variable "ses_smtp_password" {
  description = "SES SMTP password — provide on first apply via -var"
  type        = string
  sensitive   = true
}
# {{/ if_ses }}

# {{# if_s3 }}
# --- S3 ---

variable "s3_expiration_days" {
  description = "Number of days after which objects are deleted from S3 (set explicitly per environment)"
  type        = number
}
# {{/ if_s3 }}

# --- Tags ---

variable "tags" {
  description = "Common tags for all resources"
  type        = map(string)
  default     = {}
}
