mirror of
https://github.com/outbackdingo/alicloud-singapore.git
synced 2026-08-25 07:10:17 +00:00
- Creates VPC with 3 vswitches across availability zones - Creates security group with ports for all production services - Creates ACK managed Kubernetes cluster with 10 worker nodes - Auto-scaling up to 20 worker nodes - Creates SLB for load balancing - Includes deploy.sh script to apply cluster-all.yaml resources
94 lines
2.0 KiB
Terraform
94 lines
2.0 KiB
Terraform
variable "region" {
|
|
description = "Alibaba Cloud region"
|
|
type = string
|
|
default = "ap-southeast-1"
|
|
}
|
|
|
|
variable "access_key" {
|
|
description = "Alibaba Cloud access key"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "secret_key" {
|
|
description = "Alibaba Cloud secret key"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "project" {
|
|
description = "Project name prefix for resources"
|
|
type = string
|
|
default = "lingble-prod"
|
|
}
|
|
|
|
variable "vpc_cidr" {
|
|
description = "CIDR block for VPC"
|
|
type = string
|
|
default = "10.0.0.0/16"
|
|
}
|
|
|
|
variable "tags" {
|
|
description = "Tags to apply to all resources"
|
|
type = map(string)
|
|
default = {
|
|
Environment = "production"
|
|
ManagedBy = "terraform"
|
|
Cluster = "singapore-prod"
|
|
}
|
|
}
|
|
|
|
variable "k8s_cluster_spec" {
|
|
description = "ACK cluster spec: ack.pro.small, ack.standard"
|
|
type = string
|
|
default = "ack.pro.small"
|
|
}
|
|
|
|
variable "k8s_worker_instance_type" {
|
|
description = "Worker node instance type"
|
|
type = string
|
|
default = "ecs.s6-c2m2"
|
|
}
|
|
|
|
variable "k8s_worker_count" {
|
|
description = "Number of worker nodes"
|
|
type = number
|
|
default = 10
|
|
}
|
|
|
|
variable "k8s_max_worker_count" {
|
|
description = "Maximum number of worker nodes (for autoscaling)"
|
|
type = number
|
|
default = 20
|
|
}
|
|
|
|
variable "k8s_worker_disk_category" {
|
|
description = "Worker node system disk category"
|
|
type = string
|
|
default = "cloud_ssd"
|
|
}
|
|
|
|
variable "k8s_worker_disk_size" {
|
|
description = "Worker node system disk size in GB"
|
|
type = number
|
|
default = 100
|
|
}
|
|
|
|
variable "k8s_data_disk_category" {
|
|
description = "Worker node data disk category"
|
|
type = string
|
|
default = "cloud_ssd"
|
|
}
|
|
|
|
variable "k8s_data_disk_size" {
|
|
description = "Worker node data disk size in GB"
|
|
type = number
|
|
default = 200
|
|
}
|
|
|
|
variable "ssl_certificate_id" {
|
|
description = "SSL certificate ID for SLB (from alicloud_ssl_certificate)"
|
|
type = string
|
|
default = ""
|
|
}
|