# Variable definitions for authentication
variable "region_name" {
  description = "The region where the VPC endpoint service is located"
  type        = string
}

variable "access_key" {
  description = "The access key of the IAM user"
  type        = string
  sensitive   = true
}

variable "secret_key" {
  description = "The secret key of the IAM user"
  type        = string
  sensitive   = true
}

variable "instance_flavor_performance_type" {
  description = "The performance type of the ECSinstance flavor"
  type        = string
  default     = "normal"
}

variable "instance_flavor_cpu_core_count" {
  description = "The CPU core count of the ECS instance flavor"
  type        = number
  default     = 2
}

variable "instance_flavor_memory_size" {
  description = "The memory size of the ECS instance flavor"
  type        = number
  default     = 4
}

variable "instance_image_name" {
  description = "The ID of the ECS instance image"
  type        = string
  default     = "Ubuntu 20.04 server 64bit"
}

variable "instance_image_most_recent" {
  description = "Whether the instance image is most recent or not"
  type        = bool
  default     = true
}

variable "vpc_name" {
  description = "The name of the VPC"
  type        = string
}

variable "vpc_cidr" {
  description = "The CIDR block of the VPC"
  type        = string
}

variable "subnet_name" {
  description = "The name of the VPC subnet"
  type        = string
}

variable "subnet_cidr" {
  description = "The CIDR block of the VPC subnet"
  type        = string
  default     = ""
}

variable "subnet_gateway_ip" {
  description = "The gateway IP of the VPC subnet"
  type        = string
  default     = ""
}

variable "security_group_name" {
  description = "The name of the security group"
  type        = string
}

variable "instance_name" {
  description = "The name of the ECS instance"
  type        = string
}

variable "instance_flavor_id" {
  description = "The ID of the ECS instance flavor"
  type        = string
  default     = ""
}

variable "endpoint_service_name" {
  description = "The name of the VPC endpoint service"
  type        = string
}

variable "endpoint_service_type" {
  description = "The type of the VPC endpoint service"
  type        = string
  default     = "VM"
}

variable "endpoint_service_port_mapping" {
  description = "The name of the VPC endpoint service"
  type = list(object({
    service_port  = number
    terminal_port = number
  }))
}
