lib/terraforming/resource/ec2.rb in terraforming-0.7.0 vs lib/terraforming/resource/ec2.rb in terraforming-0.8.0
- old
+ new
@@ -43,9 +43,12 @@
"source_dest_check"=> instance.source_dest_check.to_s,
"tenancy"=> instance.placement.tenancy,
"vpc_security_group_ids.#"=> in_vpc ? instance.security_groups.length.to_s : "0",
}
+ placement_group = instance.placement.group_name
+ attributes["placement_group"] = placement_group unless placement_group.empty?
+
attributes["subnet_id"] = instance.subnet_id if in_vpc?(instance)
resources["aws_instance.#{module_name_of(instance)}"] = {
"type" => "aws_instance",
"primary" => {