feat(dash): SSL certificate
[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     = "classic"
139 }
140
141 variable "environment_loadbalancer_crosszone" {
142   description = "Configure the classic load balancer to route traffic evenly across all instances in all Availability Zones rather than only within each zone."
143   type        = bool
144   default     = true
145 }
146
147 variable "environment_loadbalancer_security_groups" {
148   description = "Load balancer security groups"
149   type        = list(string)
150   default     = []
151 }
152
153 variable "environment_loadbalancer_managed_security_group" {
154   description = "Load balancer managed security group"
155   type        = string
156   default     = ""
157 }
158
159 variable "environment_loadbalancer_ssl_certificate_id" {
160   type        = string
161   default     = ""
162   description = "Load Balancer SSL certificate ARN. The certificate must be present in AWS Certificate Manager"
163 }
164
165 variable "loadbalancer_connection_settings_idle_timeout" {
166   description = "Classic load balancer only: Number of seconds that the load balancer waits for any data to be sent or received over the connection. If no data has been sent or received after this time period elapses, the load balancer closes the connection."
167   type        = number
168   default     = 60
169 }
170
171 # aws:elasticbeanstalk:environment:process:default
172 variable "environment_process_default_healthcheck_interval" {
173   description = "The interval of time, in seconds, that Elastic Load Balancing checks the health of the Amazon EC2 instances of your application."
174   type        = number
175   default     = 10
176 }
177
178 variable "environment_process_default_healthy_threshold_count" {
179   description = "The number of consecutive successful requests before Elastic Load Balancing changes the instance health status."
180   type        = number
181   default     = 3
182 }
183
184 variable "environment_process_default_port" {
185   description = "Port application is listening on."
186   type        = number
187   default     = 5000
188 }
189
190 variable "environment_process_default_unhealthy_threshold_count" {
191   description = "The number of consecutive unsuccessful requests before Elastic Load Balancing changes the instance health status."
192   type        = number
193   default     = 3
194 }
195
196 # aws:autoscaling:updatepolicy:rollingupdate
197 variable "autoscaling_updatepolicy_rolling_update_enabled" {
198   description = "Whether to enable rolling update."
199   type        = bool
200   default     = true
201 }
202
203 variable "autoscaling_updatepolicy_rolling_update_type" {
204   description = "`Health` or `Immutable`. Set it to `Immutable` to apply the configuration change to a fresh group of instances."
205   type        = string
206   default     = "Immutable"
207 }
208
209 variable "autoscaling_updatepolicy_min_instance_in_service" {
210   description = "Minimum number of instances in service during update."
211   type        = number
212   default     = 1
213 }
214
215 variable "application_healthcheck_url" {
216   description = "The path where health check requests are sent to."
217   type        = string
218   default     = "HTTP:5000/"
219 }
220
221 # aws:elasticbeanstalk:command
222 variable "command_deployment_policy" {
223   description = "Use the DeploymentPolicy option to set the deployment type. The following values are supported: `AllAtOnce`, `Rolling`, `RollingWithAdditionalBatch`, `Immutable`, `TrafficSplitting`."
224   type        = string
225   default     = "Rolling"
226 }
227
228 # aws:autoscaling:updatepolicy:rollingupdate
229 variable "updatepolicy_max_batch_size" {
230   description = "Maximum number of instances to update at once."
231   type        = number
232   default     = 1
233 }
234
235 # aws:elasticbeanstalk:healthreporting:system
236 variable "healthreporting_system_type" {
237   description = "Whether to enable enhanced health reporting for this environment"
238   type        = string
239   default     = "enhanced"
240 }
241
242 # aws:elasticbeanstalk:managedactions
243 variable "managedactions_managed_actions_enabled" {
244   description = "Enable managed platform updates. When you set this to true, you must also specify a `PreferredStartTime` and `UpdateLevel`"
245   type        = bool
246   default     = true
247 }
248
249 variable "managedactions_preferred_start_time" {
250   description = "Configure a maintenance window for managed actions in UTC"
251   type        = string
252   default     = "Sun:10:00"
253 }
254
255 # aws:elasticbeanstalk:managedactions:platformupdate
256 variable "managedactions_platformupdate_update_level" {
257   description = "The highest level of update to apply with managed platform updates"
258   type        = string
259   default     = "minor"
260 }
261
262 variable "managedactions_platformupdate_instance_refresh_enabled" {
263   description = "Enable weekly instance replacement."
264   type        = bool
265   default     = true
266 }
267
268 variable "command_ignore_health_check" {
269   description = "Do not cancel a deployment due to failed health checks"
270   type        = bool
271   default     = true
272 }
273
274 # aws:autoscaling:asg
275 variable "autoscaling_asg_minsize" {
276   description = "Minumum instances to launch"
277   type        = number
278   default     = 1
279 }
280
281 variable "autoscaling_asg_maxsize" {
282   description = "Maximum instances to launch"
283   type        = number
284   default     = 2
285 }
286
287 # aws:autoscaling:trigger
288 variable "autoscaling_trigger_measure_name" {
289   description = "Metric used for your Auto Scaling trigger"
290   type        = string
291   default     = "CPUUtilization"
292 }
293
294 variable "autoscaling_trigger_statistic" {
295   description = "Statistic the trigger should use, such as Average"
296   type        = string
297   default     = "Average"
298 }
299
300 variable "autoscaling_trigger_unit" {
301   description = "Unit for the trigger measurement, such as Bytes"
302   type        = string
303   default     = "Percent"
304 }
305
306 variable "autoscaling_trigger_lower_threshold" {
307   description = "Minimum level of autoscale metric to remove an instance"
308   type        = number
309   default     = 20
310 }
311
312 variable "autoscaling_trigger_lower_breach_scale_increment" {
313   description = "How many Amazon EC2 instances to remove when performing a scaling activity."
314   type        = number
315   default     = -1
316 }
317
318 variable "autoscaling_trigger_upper_threshold" {
319   description = "Maximum level of autoscale metric to add an instance"
320   type        = number
321   default     = 80
322 }
323
324 variable "autoscaling_trigger_upper_breach_scale_increment" {
325   description = "How many Amazon EC2 instances to add when performing a scaling activity"
326   type        = number
327   default     = 1
328 }
329
330 # aws:elasticbeanstalk:hostmanager
331 variable "hostmanager_log_publication_control" {
332   description = "Copy the log files for your application's Amazon EC2 instances to the Amazon S3 bucket associated with your application"
333   type        = bool
334   default     = true
335 }
336
337 # aws:elasticbeanstalk:cloudwatch:logs
338 variable "cloudwatch_logs_stream_logs" {
339   description = "Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment"
340   type        = bool
341   default     = true
342 }
343
344 variable "cloudwatch_logs_delete_on_terminate" {
345   description = "Whether to delete the log groups when the environment is terminated. If false, the logs are kept RetentionInDays days"
346   type        = bool
347   default     = true
348 }
349
350 variable "cloudwatch_logs_retention_in_days" {
351   description = "The number of days to keep log events before they expire."
352   type        = number
353   default     = 3
354 }
355
356 # aws:elasticbeanstalk:cloudwatch:logs:health
357 variable "cloudwatch_logs_health_health_streaming_enabled" {
358   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."
359   type        = bool
360   default     = true
361 }
362
363 variable "cloudwatch_logs_health_delete_on_terminate" {
364   description = "Whether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days."
365   type        = bool
366   default     = true
367 }
368
369 variable "cloudwatch_logs_health_retention_in_days" {
370   description = "The number of days to keep the archived health data before it expires."
371   type        = number
372   default     = 3
373 }
374
375 variable "environment_type" {
376   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)."
377   type        = string
378   default     = "LoadBalanced"
379 }
380
381 # aws:elasticbeanstalk:application:environment
382 variable "environment_variables" {
383   description = "Map of custom ENV variables to be provided to the application."
384   type        = map(string)
385   default     = {}
386 }