11variable "aws_region" {
2- type = string
3- default = " us-east-1 "
2+ description = " AWS region for all resources "
3+ type = string
44}
55
66variable "project_name" {
7- type = string
8- default = " my-project "
7+ description = " Project name (used in resource naming) "
8+ type = string
99}
1010
1111variable "environment" {
12- type = string
13- default = " dev "
12+ description = " Environment tag "
13+ type = string
1414}
1515
1616variable "vpc_cidr" {
17- type = string
18- default = " 10.0.0.0/16 "
17+ description = " VPC IP range "
18+ type = string
1919}
2020
2121variable "availability_zones" {
22- type = list ( string )
23- default = [ " us-east-1a " , " us-east-1b " ]
22+ description = " AZs for high availability "
23+ type = list ( string )
2424}
2525
2626variable "enable_nat_gateway" {
27- type = bool
28- default = true
27+ description = " Enable NAT Gateway for private subnets "
28+ type = bool
2929}
3030
3131variable "single_nat_gateway" {
32- type = bool
33- default = true # Use single NAT gateway to save costs (~$32/month)
32+ description = " Use a single NAT Gateway to save costs "
33+ type = bool
3434}
3535
3636variable "eks_cluster_version" {
37- type = string
38- default = " 1.31 "
37+ description = " Kubernetes version for EKS cluster "
38+ type = string
3939}
4040
4141variable "eks_node_instance_types" {
42- type = list ( string )
43- default = [ " t3.medium " ]
42+ description = " EC2 instance type for nodes "
43+ type = list ( string )
4444}
4545
4646variable "eks_node_desired_size" {
47- type = number
48- default = 2
47+ description = " Number of nodes to run "
48+ type = number
4949}
5050
5151variable "eks_node_min_size" {
52- type = number
53- default = 1
52+ description = " Min nodes for autoscaling "
53+ type = number
5454}
5555
5656variable "eks_node_max_size" {
57- type = number
58- default = 4
57+ description = " Max nodes for autoscaling "
58+ type = number
5959}
6060
6161variable "eks_node_disk_size" {
62- type = number
63- default = 20
62+ description = " Disk size per node (GB) "
63+ type = number
6464}
6565
6666variable "eks_endpoint_private_access" {
67- type = bool
68- default = true
67+ description = " Allow cluster access from VPC "
68+ type = bool
6969}
7070
7171variable "eks_endpoint_public_access" {
72- type = bool
73- default = true
72+ description = " Allow kubectl from internet "
73+ type = bool
7474}
7575
7676variable "eks_enable_prefix_delegation" {
7777 description = " Enable IP prefix delegation for VPC CNI to support more pods per node"
7878 type = bool
79- default = true
8079}
8180
8281variable "eks_max_pods_per_node" {
8382 description = " Maximum number of pods per node when prefix delegation is enabled"
8483 type = number
85- default = 110
8684}
8785
8886variable "db_engine" {
89- type = string
90- default = " postgres "
87+ description = " Database engine "
88+ type = string
9189}
9290
9391variable "db_engine_version" {
94- type = string
95- default = " 16.4 "
92+ description = " PostgreSQL version "
93+ type = string
9694}
9795
9896variable "db_instance_class" {
99- type = string
100- default = " db.t3.micro "
97+ description = " Instance size "
98+ type = string
10199}
102100
103101variable "db_allocated_storage" {
104- type = number
105- default = 20
102+ description = " Initial storage (GB) "
103+ type = number
106104}
107105
108106variable "db_max_allocated_storage" {
109- type = number
110- default = 100
107+ description = " Max autoscaling storage (GB) "
108+ type = number
111109}
112110
113111variable "db_storage_type" {
114- type = string
115- default = " gp3 "
112+ description = " Storage type "
113+ type = string
116114}
117115
118116variable "db_storage_encrypted" {
119- type = bool
120- default = true
117+ description = " Encrypt data at rest "
118+ type = bool
121119}
122120
123121variable "db_name" {
124- type = string
125- default = " mydb "
122+ description = " Database name "
123+ type = string
126124}
127125
128126variable "db_username" {
129- type = string
130- sensitive = true
127+ description = " Database master username"
128+ type = string
129+ sensitive = true
131130}
132131
133132variable "db_password" {
134- type = string
135- sensitive = true
133+ description = " Database master password"
134+ type = string
135+ sensitive = true
136136}
137137
138138variable "db_port" {
139- type = number
140- default = 5432
139+ description = " Database port "
140+ type = number
141141}
142142
143143variable "db_multi_az" {
144- type = bool
145- default = false
144+ description = " Enable Multi-AZ deployment "
145+ type = bool
146146}
147147
148148variable "db_publicly_accessible" {
149- type = bool
150- default = false
149+ description = " Allow public access for CLI connectivity "
150+ type = bool
151151}
152152
153153variable "db_backup_retention_period" {
154- type = number
155- default = 7
154+ description = " Keep backups for 7 days "
155+ type = number
156156}
157157
158158variable "db_backup_window" {
159- type = string
160- default = " 03:00-04:00 "
159+ description = " Backup time (UTC) "
160+ type = string
161161}
162162
163163variable "db_maintenance_window" {
164- type = string
165- default = " mon:04:00-mon:05:00 "
164+ description = " Maintenance time (UTC) "
165+ type = string
166166}
167167
168168variable "db_skip_final_snapshot" {
169- type = bool
170- default = true
169+ description = " Skip snapshot for faster destroy "
170+ type = bool
171171}
172172
173173variable "db_deletion_protection" {
174- type = bool
175- default = false
174+ description = " Allow deletion "
175+ type = bool
176176}
177177
178178variable "db_performance_insights_enabled" {
179- type = bool
180- default = false
179+ description = " Disable to save costs "
180+ type = bool
181181}
182182
183183variable "ses_domain" {
184- type = string
185184 description = " Domain for SES email sending (e.g., yourdomain.com)"
186- default = " "
185+ type = string
187186}
188187
189188variable "ses_email" {
190- type = string
191189 description = " Email address for SES verification (optional, leave empty to use domain only)"
192- default = " "
190+ type = string
193191}
0 commit comments