summaryrefslogtreecommitdiff
path: root/astroshop-terraform/modules/eks/variables.tf
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-09-28 04:19:42 +0530
committerSaumit <justsaumit@protonmail.com>2025-09-28 04:19:42 +0530
commitc91e833ccba15a311e23cc21709cdefaf90b4398 (patch)
treee3a78b5eb61673dc3ace1d97a88727dc49384b4e /astroshop-terraform/modules/eks/variables.tf
parent44b0d2d9dea535d5580d78ae4a5082732639e2bf (diff)
eks: Add EKS cluster and node group configuration with IAM roles and policies
Diffstat (limited to 'astroshop-terraform/modules/eks/variables.tf')
-rw-r--r--astroshop-terraform/modules/eks/variables.tf63
1 files changed, 63 insertions, 0 deletions
diff --git a/astroshop-terraform/modules/eks/variables.tf b/astroshop-terraform/modules/eks/variables.tf
new file mode 100644
index 0000000..88a052f
--- /dev/null
+++ b/astroshop-terraform/modules/eks/variables.tf
@@ -0,0 +1,63 @@
+variable "cluster_name" {
+ description = "The name of the EKS cluster"
+ type = string
+}
+
+variable "cluster_version" {
+ description = "Kubernetes version for the EKS cluster"
+ type = string
+ default = "1.32"
+}
+
+variable "vpc_id" {
+ description = "VPC ID where the cluster will be created"
+ type = string
+}
+
+variable "subnet_ids" {
+ description = "Private subnet IDs for the EKS cluster"
+ type = list(string)
+}
+
+variable "node_groups" {
+ description = "EKS node group configuration"
+ type = map(object({
+ instance_types = list(string)
+ capacity_type = string
+ scaling_config = object({
+ desired_size = number
+ max_size = number
+ min_size = number
+ })
+ }))
+
+ default = {
+ general = {
+ instance_types = ["m7i-flex.large"]
+ capacity_type = "ON_DEMAND"
+ scaling_config = {
+ desired_size = 2
+ max_size = 3
+ min_size = 1
+ }
+ }
+ }
+}
+
+variable "endpoint_private_access" {
+ description = "Enable private API server endpoint"
+ type = bool
+ default = true
+}
+
+variable "endpoint_public_access" {
+ description = "Enable public API server endpoint"
+ type = bool
+ default = true
+}
+
+variable "public_access_cidrs" {
+ description = "List of CIDR blocks that can access the public API endpoint"
+ type = list(string)
+ default = [] # CHANGE THIS TO YOUR IP RANGE IN PRODUCTION
+}