diff --git a/modules.tf b/modules.tf index b7360ed..6ea771a 100644 --- a/modules.tf +++ b/modules.tf @@ -156,6 +156,6 @@ module "worker" { instance-profile-name = "${ module.iam.instance-profile-name-worker }" s3-bucket = "${ module.s3.bucket }" security-group-id = "${ module.security.worker-id }" - subnet-id = "${ element( split(",", module.vpc.subnet-ids-private), 0 ) }" + subnet-ids = "${ module.vpc.subnet-ids-private }" vpc-id = "${ module.vpc.id }" } diff --git a/modules/worker/ec2.tf b/modules/worker/ec2.tf index 8cff49c..db99600 100644 --- a/modules/worker/ec2.tf +++ b/modules/worker/ec2.tf @@ -37,7 +37,7 @@ resource "aws_autoscaling_group" "worker" { launch_configuration = "${ aws_launch_configuration.worker.name }" max_size = "${ var.capacity["max"] }" min_size = "${ var.capacity["min"] }" - vpc_zone_identifier = [ "${ var.subnet-id }" ] + vpc_zone_identifier = [ "${ var.subnet-ids }" ] tag { key = "builtWith" diff --git a/modules/worker/io.tf b/modules/worker/io.tf index b054be7..63bec78 100644 --- a/modules/worker/io.tf +++ b/modules/worker/io.tf @@ -21,7 +21,7 @@ variable "k8s" { variable "name" {} variable "s3-bucket" {} variable "security-group-id" {} -variable "subnet-id" {} +variable "subnet-ids" {} variable "volume_size" { default = { ebs = 250