fix(uti): Terraform settings
[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:autoscaling:updatepolicy:rollingupdate
167 variable "autoscaling_updatepolicy_rolling_update_enabled" {
168   description = "Whether to enable rolling update."
169   type        = bool
170   default     = true
171 }
172
173 variable "autoscaling_updatepolicy_rolling_update_type" {
174   description = "`Health` or `Immutable`. Set it to `Immutable` to apply the configuration change to a fresh group of instances."
175   type        = string
176   default     = "Immutable"
177 }
178
179 variable "autoscaling_updatepolicy_min_instance_in_service" {
180   description = "Minimum number of instances in service during update."
181   type        = number
182   default     = 1
183 }
184
185 # aws:elasticbeanstalk:command
186 variable "command_deployment_policy" {
187   description = "Use the DeploymentPolicy option to set the deployment type. The following values are supported: `AllAtOnce`, `Rolling`, `RollingWithAdditionalBatch`, `Immutable`, `TrafficSplitting`."
188   type        = string
189   default     = "Rolling"
190 }
191
192 # aws:autoscaling:updatepolicy:rollingupdate
193 variable "updatepolicy_max_batch_size" {
194   description = "Maximum number of instances to update at once."
195   type        = number
196   default     = 1
197 }
198
199 # aws:elasticbeanstalk:healthreporting:system
200 variable "healthreporting_system_type" {
201   description = "Whether to enable enhanced health reporting for this environment"
202   type        = string
203   default     = "enhanced"
204 }
205
206 # aws:elasticbeanstalk:managedactions
207 variable "managedactions_managed_actions_enabled" {
208   description = "Enable managed platform updates. When you set this to true, you must also specify a `PreferredStartTime` and `UpdateLevel`"
209   type        = bool
210   default     = true
211 }
212
213 variable "managedactions_preferred_start_time" {
214   description = "Configure a maintenance window for managed actions in UTC"
215   type        = string
216   default     = "Sun:10:00"
217 }
218
219 # aws:elasticbeanstalk:managedactions:platformupdate
220 variable "managedactions_platformupdate_update_level" {
221   description = "The highest level of update to apply with managed platform updates"
222   type        = string
223   default     = "minor"
224 }
225
226 variable "managedactions_platformupdate_instance_refresh_enabled" {
227   description = "Enable weekly instance replacement."
228   type        = bool
229   default     = true
230 }
231
232 # aws:autoscaling:asg
233 variable "autoscaling_asg_minsize" {
234   description = "Minumum instances to launch"
235   type        = number
236   default     = 1
237 }
238
239 variable "autoscaling_asg_maxsize" {
240   description = "Maximum instances to launch"
241   type        = number
242   default     = 2
243 }
244
245 # aws:autoscaling:trigger
246 variable "autoscaling_trigger_measure_name" {
247   description = "Metric used for your Auto Scaling trigger"
248   type        = string
249   default     = "CPUUtilization"
250 }
251
252 variable "autoscaling_trigger_statistic" {
253   description = "Statistic the trigger should use, such as Average"
254   type        = string
255   default     = "Average"
256 }
257
258 variable "autoscaling_trigger_unit" {
259   description = "Unit for the trigger measurement, such as Bytes"
260   type        = string
261   default     = "Percent"
262 }
263
264 variable "autoscaling_trigger_lower_threshold" {
265   description = "Minimum level of autoscale metric to remove an instance"
266   type        = number
267   default     = 20
268 }
269
270 variable "autoscaling_trigger_lower_breach_scale_increment" {
271   description = "How many Amazon EC2 instances to remove when performing a scaling activity."
272   type        = number
273   default     = -1
274 }
275
276 variable "autoscaling_trigger_upper_threshold" {
277   description = "Maximum level of autoscale metric to add an instance"
278   type        = number
279   default     = 80
280 }
281
282 variable "autoscaling_trigger_upper_breach_scale_increment" {
283   description = "How many Amazon EC2 instances to add when performing a scaling activity"
284   type        = number
285   default     = 1
286 }
287
288 # aws:elasticbeanstalk:hostmanager
289 variable "hostmanager_log_publication_control" {
290   description = "Copy the log files for your application's Amazon EC2 instances to the Amazon S3 bucket associated with your application"
291   type        = bool
292   default     = true
293 }
294
295 # aws:elasticbeanstalk:cloudwatch:logs
296 variable "cloudwatch_logs_stream_logs" {
297   description = "Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment"
298   type        = bool
299   default     = true
300 }
301
302 variable "cloudwatch_logs_delete_on_terminate" {
303   description = "Whether to delete the log groups when the environment is terminated. If false, the logs are kept RetentionInDays days"
304   type        = bool
305   default     = true
306 }
307
308 variable "cloudwatch_logs_retention_in_days" {
309   description = "The number of days to keep log events before they expire."
310   type        = number
311   default     = 3
312 }
313
314 # aws:elasticbeanstalk:cloudwatch:logs:health
315 variable "cloudwatch_logs_health_health_streaming_enabled" {
316   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."
317   type        = bool
318   default     = true
319 }
320
321 variable "cloudwatch_logs_health_delete_on_terminate" {
322   description = "Whether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days."
323   type        = bool
324   default     = true
325 }
326
327 variable "cloudwatch_logs_health_retention_in_days" {
328   description = "The number of days to keep the archived health data before it expires."
329   type        = number
330   default     = 3
331 }
332
333 variable "environment_type" {
334   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)."
335   type        = string
336   default     = "LoadBalanced"
337 }
338
339 # aws:elasticbeanstalk:application:environment
340 variable "environment_variables" {
341   description = "Map of custom ENV variables to be provided to the application."
342   type        = map(string)
343   default     = {}
344 }