1
1
variable "cluster_name" {
2
2
description = " Name of the ECS Cluster to associate with the Autoscaling Group"
3
3
type = string
4
+ nullable = false
4
5
}
5
6
6
7
variable "name" {
@@ -12,6 +13,7 @@ variable "name" {
12
13
variable "vpc_zone_identifier" {
13
14
description = " (Optional) List of subnet IDs to launch resources in."
14
15
type = list (string )
16
+ nullable = false
15
17
default = []
16
18
}
17
19
@@ -33,31 +35,42 @@ variable "max_size" {
33
35
variable "protect_from_scale_in" {
34
36
description = " (Optional) Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in."
35
37
type = bool
38
+ nullable = false
36
39
default = false
37
40
}
38
41
39
42
variable "health_check_type" {
40
43
description = " (Optional) \" EC2\" or \" ELB\" . Controls how health checking is done."
41
44
type = string
45
+ nullable = false
42
46
default = " EC2"
43
47
}
44
48
45
49
variable "instances_tags" {
46
50
description = " Resources Tags to propagate to the Instances"
47
51
type = map (string )
52
+ nullable = false
48
53
default = {}
49
54
}
50
55
51
56
variable "tags" {
52
57
description = " Resources Tags for Autoscaling group"
53
58
type = map (string )
59
+ nullable = false
54
60
default = {}
55
61
}
56
62
57
63
# ###############################################################################
58
64
# Launch Template
59
65
# ###############################################################################
60
66
67
+ variable "create_launch_template" {
68
+ description = " Either to create a Launch Template to associate with the Autoscaling group"
69
+ type = bool
70
+ nullable = false
71
+ default = true
72
+ }
73
+
61
74
variable "launch_template" {
62
75
description = " Launch Template to use with the Autoscaling group"
63
76
type = object ({
@@ -80,13 +93,8 @@ variable "launch_template" {
80
93
user_data = optional (string , null )
81
94
tags = optional (map (string ), {})
82
95
})
83
- default = {}
84
- }
85
-
86
- variable "create_launch_template" {
87
- description = " Either to create a Launch Template to associate with the Autoscaling group"
88
- type = bool
89
- default = true
96
+ nullable = false
97
+ default = {}
90
98
}
91
99
92
100
variable "launch_template_id" {
@@ -114,6 +122,7 @@ variable "iam_role_name" {
114
122
variable "iam_role_policy_attachments" {
115
123
description = " (Required) - The ARN of the policy you want to apply"
116
124
type = list (string )
125
+ nullable = false
117
126
default = [
118
127
" arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
119
128
]
@@ -122,6 +131,7 @@ variable "iam_role_policy_attachments" {
122
131
variable "iam_role_tags" {
123
132
description = " Key-value mapping of tags for the IAM role."
124
133
type = map (string )
134
+ nullable = false
125
135
default = {}
126
136
}
127
137
@@ -138,5 +148,6 @@ variable "iam_instance_profile_name" {
138
148
variable "iam_instance_profile_tags" {
139
149
description = " (Optional) Map of resource tags for the IAM Instance Profile."
140
150
type = map (string )
151
+ nullable = false
141
152
default = {}
142
153
}
0 commit comments