11variable "cluster_name" {
22 description = " Name of the ECS Cluster to associate with the Autoscaling Group"
33 type = string
4+ nullable = false
45}
56
67variable "name" {
@@ -12,6 +13,7 @@ variable "name" {
1213variable "vpc_zone_identifier" {
1314 description = " (Optional) List of subnet IDs to launch resources in."
1415 type = list (string )
16+ nullable = false
1517 default = []
1618}
1719
@@ -33,31 +35,42 @@ variable "max_size" {
3335variable "protect_from_scale_in" {
3436 description = " (Optional) Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in."
3537 type = bool
38+ nullable = false
3639 default = false
3740}
3841
3942variable "health_check_type" {
4043 description = " (Optional) \" EC2\" or \" ELB\" . Controls how health checking is done."
4144 type = string
45+ nullable = false
4246 default = " EC2"
4347}
4448
4549variable "instances_tags" {
4650 description = " Resources Tags to propagate to the Instances"
4751 type = map (string )
52+ nullable = false
4853 default = {}
4954}
5055
5156variable "tags" {
5257 description = " Resources Tags for Autoscaling group"
5358 type = map (string )
59+ nullable = false
5460 default = {}
5561}
5662
5763# ###############################################################################
5864# Launch Template
5965# ###############################################################################
6066
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+
6174variable "launch_template" {
6275 description = " Launch Template to use with the Autoscaling group"
6376 type = object ({
@@ -80,13 +93,8 @@ variable "launch_template" {
8093 user_data = optional (string , null )
8194 tags = optional (map (string ), {})
8295 })
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 = {}
9098}
9199
92100variable "launch_template_id" {
@@ -114,6 +122,7 @@ variable "iam_role_name" {
114122variable "iam_role_policy_attachments" {
115123 description = " (Required) - The ARN of the policy you want to apply"
116124 type = list (string )
125+ nullable = false
117126 default = [
118127 " arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"
119128 ]
@@ -122,6 +131,7 @@ variable "iam_role_policy_attachments" {
122131variable "iam_role_tags" {
123132 description = " Key-value mapping of tags for the IAM role."
124133 type = map (string )
134+ nullable = false
125135 default = {}
126136}
127137
@@ -138,5 +148,6 @@ variable "iam_instance_profile_name" {
138148variable "iam_instance_profile_tags" {
139149 description = " (Optional) Map of resource tags for the IAM Instance Profile."
140150 type = map (string )
151+ nullable = false
141152 default = {}
142153}
0 commit comments