Skip to content

Commit 1e1bbff

Browse files
committed
add: option to select subnet
1 parent b25438b commit 1e1bbff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ module "launch_template" {
305305
# #############################################################################
306306
resource "aws_autoscaling_group" "this" {
307307
name_prefix = local.name
308-
vpc_zone_identifier = var.private_subnet_ids
308+
vpc_zone_identifier = var.is_create_public_lb || var.is_create_private_lb ? var.private_subnet_ids : var.public_subnet_ids
309309
desired_capacity = 1
310310
max_size = 1 #fix 1 to avoid race condition (if not move to document db for multi read/write)
311311
min_size = 1

0 commit comments

Comments
 (0)