File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -114,3 +114,15 @@ module "ec2_with_t3_unlimited" {
114
114
associate_public_ip_address = true
115
115
}
116
116
117
+ # This instance won't be created
118
+ module "ec2_zero" {
119
+ source = " ../../"
120
+
121
+ instance_count = 0
122
+
123
+ name = " example-zero"
124
+ ami = data. aws_ami . amazon_linux . id
125
+ instance_type = " c5.large"
126
+ subnet_id = tolist (data. aws_subnet_ids . all . ids )[0 ]
127
+ vpc_security_group_ids = [module . security_group . this_security_group_id ]
128
+ }
Original file line number Diff line number Diff line change 7
7
this_primary_network_interface_id = compact (coalescelist (aws_instance. this . * . primary_network_interface_id , aws_instance. this_t2 . * . primary_network_interface_id , [" " ]))
8
8
this_private_dns = compact (coalescelist (aws_instance. this . * . private_dns , aws_instance. this_t2 . * . private_dns , [" " ]))
9
9
this_private_ip = compact (coalescelist (aws_instance. this . * . private_ip , aws_instance. this_t2 . * . private_ip , [" " ]))
10
- this_placement_group = compact (concat ( coalescelist (aws_instance. this . * . placement_group , aws_instance. this_t2 . * . placement_group ) , [" " ]))
10
+ this_placement_group = compact (coalescelist (aws_instance. this . * . placement_group , aws_instance. this_t2 . * . placement_group , [" " ]))
11
11
this_security_groups = coalescelist (aws_instance. this . * . security_groups , aws_instance. this_t2 . * . security_groups , [" " ])
12
12
this_vpc_security_group_ids = coalescelist (flatten (aws_instance. this . * . vpc_security_group_ids ), flatten (aws_instance. this_t2 . * . vpc_security_group_ids ), [" " ])
13
13
this_subnet_id = compact (coalescelist (aws_instance. this . * . subnet_id , aws_instance. this_t2 . * . subnet_id , [" " ]))
You can’t perform that action at this time.
0 commit comments