variable "ec2" {
  description = "List of EC2 instance configurations"
  type = list(object({
    name                = string
    type                = string
    ami                 = string
    port                = number
    subnet_id           = string
    vpc_zone_subnet_ids = list(string)
    volume_size         = number
    create_asg          = bool
    desired_capacity    = number
    min_size            = number
    max_size            = number
    security_group_ids  = list(string)
    target_group_arns   = list(string)
    user_data           = string
    alerts_topic_arn    = string
    health_check_path   = optional(string, "/")
    health_check_matcher = optional(string, "200")
  }))
}

variable "service_name" {
  description = "Service name prefix for shared resources (e.g. client-stage)"
  type        = string
}

variable "vpc_id" {
  description = "VPC ID for target groups"
  type        = string
}

variable "service_tags" {
  description = "Resource tags"
  type        = map(string)
  default     = {}
}

variable "s3_bucket_arns" {
  description = "S3 bucket ARNs (bucket + objects) the EC2 instances need access to"
  type        = list(string)
  default     = []
}
