File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ resource "aws_autoscaling_group" "ASG" {
4040 version = " $Latest"
4141 }
4242
43- vpc_zone_identifier = data. aws_subnet_ids . subnets . ids
43+ vpc_zone_identifier = coalescelist (var . subnet_ids , list ( data. aws_subnet_ids . subnets . ids ))
4444 termination_policies = [" OldestInstance" ]
4545
4646 tag {
Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ variable "security_groups" {
3838 default = []
3939}
4040
41+ variable "subnet_ids" {
42+ description = " list of subnet ids. By default takes all subnets from the VPC"
43+ type = " list"
44+ default = []
45+ }
46+
4147variable "spot" {
4248 description = " Whether or not use Spot instances. Warning: most likely not suitable for production!"
4349 default = false
You can’t perform that action at this time.
0 commit comments