File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,11 @@ variable "desired_capacity" {
8989 default = 3
9090}
9191
92+ variable "associate_public_ip_address" {
93+ description = " Should created instances be publicly accessible (if the SG allows)"
94+ default = false
95+ }
96+
9297variable "root_volume_size" {
9398 description = " Root volume size in GB"
9499 default = 25
@@ -165,13 +170,14 @@ resource "template_file" "cloud_config" {
165170resource "aws_launch_configuration" "main" {
166171 name_prefix = " ${ format (" %s-" , var. name )} "
167172
168- image_id = " ${ var . image_id } "
169- instance_type = " ${ var . instance_type } "
170- ebs_optimized = " ${ var . instance_ebs_optimized } "
171- iam_instance_profile = " ${ var . iam_instance_profile } "
172- key_name = " ${ var . key_name } "
173- security_groups = [" ${ aws_security_group . cluster . id } " ]
174- user_data = " ${ template_file . cloud_config . rendered } "
173+ image_id = " ${ var . image_id } "
174+ instance_type = " ${ var . instance_type } "
175+ ebs_optimized = " ${ var . instance_ebs_optimized } "
176+ iam_instance_profile = " ${ var . iam_instance_profile } "
177+ key_name = " ${ var . key_name } "
178+ security_groups = [" ${ aws_security_group . cluster . id } " ]
179+ user_data = " ${ template_file . cloud_config . rendered } "
180+ associate_public_ip_address = " ${ var . associate_public_ip_address } "
175181
176182 # root
177183 root_block_device {
You can’t perform that action at this time.
0 commit comments