variable "env_prefix" {
  type        = string
  description = "Prefix of the environment, lowercased"
}

variable "project_group" {
  type        = string
  description = "Project group name, lowercased"
}

variable "name" {
  type        = string
  description = "Compute environment name, lowercased"
}

variable "common_tags" {
  type        = map(string)
  description = "Map of tags applied to objects"
  default     = {}
}

variable "enabled" {
  type        = bool
  description = "Set whether compute environment is enabled or disabled. Enabled by default"
  default     = true
}

variable "batch_service_role" {
  type        = string
  description = "IAM batch service role"
}

variable "instance_role" {
  type        = string
  description = "IAM ecs instance role "
}

variable "spot_iam_fleet_role" {
  type        = string
  description = "Role for the spot fleet"
}

variable "bid_percentage" {
  type        = number
  default     = 50
  description = <<EOF
Integer of minimum percentage that a Spot Instance price must be when compared with the On-Demand price
for that instance type before instances are launched. For example, if your bid percentage is 20% (20),
then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.
EOF
}

variable "instance_types" {
  type        = list(string)
  description = "List of instance types which will be used in environment. Optimal by default"
  default     = ["optimal"]
}

variable "max_vcpus" {
  type        = number
  description = "Maximum number of virtual cpus for environment. 256 by default"
  default     = 256
}

variable "min_vcpus" {
  type        = number
  description = "Minimum number of virtual cpus for environment. 0 by default"
  default     = 0
}

variable "ec2_key_pair" {
  type        = string
  description = "Name of keypair for EC2 instances"
}

variable "security_groups" {
  type        = list(string)
  description = "List of security groups ids to be applied to compute environment instances"
}

variable "subnets" {
  type        = list(string)
  description = "List of subnets where compute environment will create its resources"
}

variable "custom_image_id" {
  type        = string
  description = "In case you don't want to use latest amazon-ecs-optimized image, you can specify your own image"
  default     = ""
}

variable "prefix" {
  type    = bool
  default = true
}
