c2a1ea3cf7bf3d71b27b3ceae49181d1f3b89cd8
[csit.git] / fdio.infra.terraform / terraform-aws-elastic-beanstalk-environment / variables.tf
1 # Variables for elastic beanstalk VPC
2 variable "vpc_cidr_block" {
3   description = "The CIDR block for the association."
4   type        = string
5   default     = "192.168.0.0/24"
6 }
7
8 variable "vpc_enable_dns_hostnames" {
9   description = "Whether or not the VPC has DNS hostname support."
10   type        = bool
11   default     = true
12 }
13
14 variable "vpc_enable_dns_support" {
15   description = "Whether or not the VPC has DNS support."
16   type        = bool
17   default     = true
18 }
19
20 variable "vpc_instance_tenancy" {
21   description = "The allowed tenancy of instances launched into the selected VPC."
22   type        = string
23   default     = "default"
24 }
25
26 # Variables for elastic beanstalk Subnet
27 variable "subnet_availability_zone" {
28   description = "AWS availability zone"
29   type        = string
30   default     = "us-east-1a"
31 }
32
33 # Variables for elastic beanstalk Application
34 variable "environment_application" {
35   description = "The name of the application, must be unique within account."
36   type        = string
37   default     = "Beanstalk Application"
38 }
39
40 variable "application_description" {
41   description = "Short description of the application."
42   type        = string
43   default     = "Beanstalk Application"
44 }
45
46 variable "application_name" {
47   description = "The name of the application, must be unique within account."
48   type        = string
49   default     = "Beanstalk"
50 }
51
52 variable "appversion_lifecycle_service_role_arn" {
53   description = "The service role ARN to use for application version cleanup. If left empty, the `appversion_lifecycle` block will not be created."
54   type        = string
55   default     = ""
56 }
57
58 variable "appversion_lifecycle_max_count" {
59   description = "The max number of application versions to keep"
60   type        = number
61   default     = 2
62 }
63
64 variable "appversion_lifecycle_delete_source_from_s3" {
65   description = "Whether to delete application versions from S3 source"
66   type        = bool
67   default     = false
68 }
69
70 # Variables for elastic beanstalk Environment
71 variable "environment_description" {
72   description = "Short description of the environment."
73   type        = string
74   default     = "Beanstalk Environment"
75 }
76
77 variable "environment_name" {
78   description = "A unique name for this Environment. This name is used in the application URL."
79   type        = string
80   default     = "Beanstalk-env"
81 }
82
83 variable "environment_solution_stack_name" {
84   description = "A solution stack to base your environment off of."
85   type        = string
86   default     = "64bit Amazon Linux 2 v3.3.11 running Python 3.8"
87 }
88
89 variable "environment_tier" {
90   description = "The environment tier specified."
91   type        = string
92   default     = "WebServer"
93 }
94
95 variable "environment_wait_for_ready_timeout" {
96   description = "The maximum duration to wait for the Elastic Beanstalk Environment to be in a ready state before timing out"
97   type        = string
98   default     = "20m"
99 }
100
101 variable "environment_version_label" {
102   description = "The name of the Elastic Beanstalk Application Version to use in deployment."
103   type        = string
104   default     = ""
105 }
106
107 # aws:ec2:instances
108 variable "instances_instance_types" {
109   description = "Instances type"
110   type        = string
111   default     = "t3.medium"
112 }
113
114 # aws:ec2:vpc
115 variable "associate_public_ip_address" {
116   description = "Whether to associate public IP addresses to the instances."
117   type        = bool
118   default     = true
119 }
120
121 variable "elb_scheme" {
122   description = "Specify `internal` if you want to create an internal load balancer in your Amazon VPC so that your Elastic Beanstalk application cannot be accessed from outside your Amazon VPC."
123   type        = string
124   default     = "public"
125 }
126
127 # aws:elbv2:listener:default
128 variable "default_listener_enabled" {
129   description = "Set to false to disable the listener. You can use this option to disable the default listener on port 80."
130   type        = bool
131   default     = true
132 }
133
134 # aws:elasticbeanstalk:environment
135 variable "environment_loadbalancer_type" {
136   description = "Load Balancer type, e.g. 'application' or 'classic'."
137   type        = string
138   default     = "network"
139 }
140
141 # aws:elasticbeanstalk:environment:process:default
142 variable "environment_process_default_healthcheck_interval" {
143   description = "The interval of time, in seconds, that Elastic Load Balancing checks the health of the Amazon EC2 instances of your application."
144   type        = number
145   default     = 10
146 }
147
148 variable "environment_process_default_healthy_threshold_count" {
149   description = "The number of consecutive successful requests before Elastic Load Balancing changes the instance health status."
150   type        = number
151   default     = 3
152 }
153
154 variable "environment_process_default_port" {
155   description = "Port application is listening on."
156   type        = number
157   default     = 5000
158 }
159
160 variable "environment_process_default_unhealthy_threshold_count" {
161   description = "The number of consecutive unsuccessful requests before Elastic Load Balancing changes the instance health status."
162   type        = number
163   default     = 3
164 }
165
166 # aws:elasticbeanstalk:healthreporting:system
167 variable "healthreporting_system_type" {
168   description = "Whether to enable enhanced health reporting for this environment"
169   type        = string
170   default     = "enhanced"
171 }
172
173 # aws:elasticbeanstalk:managedactions
174 variable "managedactions_managed_actions_enabled" {
175   description = "Enable managed platform updates. When you set this to true, you must also specify a `PreferredStartTime` and `UpdateLevel`"
176   type        = bool
177   default     = true
178 }
179
180 variable "managedactions_preferred_start_time" {
181   description = "Configure a maintenance window for managed actions in UTC"
182   type        = string
183   default     = "Sun:10:00"
184 }
185
186 # aws:elasticbeanstalk:managedactions:platformupdate
187 variable "managedactions_platformupdate_update_level" {
188   description = "The highest level of update to apply with managed platform updates"
189   type        = string
190   default     = "minor"
191 }
192
193 variable "managedactions_platformupdate_instance_refresh_enabled" {
194   description = "Enable weekly instance replacement."
195   type        = bool
196   default     = true
197 }
198
199 # aws:autoscaling:asg
200 variable "autoscaling_asg_minsize" {
201   description = "Minumum instances to launch"
202   type        = number
203   default     = 1
204 }
205
206 variable "autoscaling_asg_maxsize" {
207   description = "Maximum instances to launch"
208   type        = number
209   default     = 2
210 }
211
212 # aws:autoscaling:trigger
213 variable "autoscaling_trigger_measure_name" {
214   description = "Metric used for your Auto Scaling trigger"
215   type        = string
216   default     = "CPUUtilization"
217 }
218
219 variable "autoscaling_trigger_statistic" {
220   description = "Statistic the trigger should use, such as Average"
221   type        = string
222   default     = "Average"
223 }
224
225 variable "autoscaling_trigger_unit" {
226   description = "Unit for the trigger measurement, such as Bytes"
227   type        = string
228   default     = "Percent"
229 }
230
231 variable "autoscaling_trigger_lower_threshold" {
232   description = "Minimum level of autoscale metric to remove an instance"
233   type        = number
234   default     = 20
235 }
236
237 variable "autoscaling_trigger_lower_breach_scale_increment" {
238   description = "How many Amazon EC2 instances to remove when performing a scaling activity."
239   type        = number
240   default     = -1
241 }
242
243 variable "autoscaling_trigger_upper_threshold" {
244   description = "Maximum level of autoscale metric to add an instance"
245   type        = number
246   default     = 80
247 }
248
249 variable "autoscaling_trigger_upper_breach_scale_increment" {
250   description = "How many Amazon EC2 instances to add when performing a scaling activity"
251   type        = number
252   default     = 1
253 }
254
255 # aws:elasticbeanstalk:hostmanager
256 variable "hostmanager_log_publication_control" {
257   description = "Copy the log files for your application's Amazon EC2 instances to the Amazon S3 bucket associated with your application"
258   type        = bool
259   default     = true
260 }
261
262 # aws:elasticbeanstalk:cloudwatch:logs
263 variable "cloudwatch_logs_stream_logs" {
264   description = "Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment"
265   type        = bool
266   default     = true
267 }
268
269 variable "cloudwatch_logs_delete_on_terminate" {
270   description = "Whether to delete the log groups when the environment is terminated. If false, the logs are kept RetentionInDays days"
271   type        = bool
272   default     = true
273 }
274
275 variable "cloudwatch_logs_retention_in_days" {
276   description = "The number of days to keep log events before they expire."
277   type        = number
278   default     = 3
279 }
280
281 # aws:elasticbeanstalk:cloudwatch:logs:health
282 variable "cloudwatch_logs_health_health_streaming_enabled" {
283   description = "For environments with enhanced health reporting enabled, whether to create a group in CloudWatch Logs for environment health and archive Elastic Beanstalk environment health data. For information about enabling enhanced health, see aws:elasticbeanstalk:healthreporting:system."
284   type        = bool
285   default     = true
286 }
287
288 variable "cloudwatch_logs_health_delete_on_terminate" {
289   description = "Whether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days."
290   type        = bool
291   default     = true
292 }
293
294 variable "cloudwatch_logs_health_retention_in_days" {
295   description = "The number of days to keep the archived health data before it expires."
296   type        = number
297   default     = 3
298 }
299
300 variable "environment_type" {
301   description = "Environment type, e.g. 'LoadBalanced' or 'SingleInstance'. If setting to 'SingleInstance', `rolling_update_type` must be set to 'Time', `updating_min_in_service` must be set to 0, and `loadbalancer_subnets` will be unused (it applies to the ELB, which does not exist in SingleInstance environments)."
302   type        = string
303   default     = "LoadBalanced"
304 }
305
306 # aws:elasticbeanstalk:application:environment
307 variable "environment_variables" {
308   description = "Map of custom ENV variables to be provided to the application."
309   type        = map(string)
310   default     = {}
311 }