lib/terraforming/template/tf/ec2.erb in terraforming-0.7.0 vs lib/terraforming/template/tf/ec2.erb in terraforming-0.8.0
- old
+ new
@@ -2,9 +2,12 @@
resource "aws_instance" "<%= module_name_of(instance) %>" {
ami = "<%= instance.image_id %>"
availability_zone = "<%= instance.placement.availability_zone %>"
ebs_optimized = <%= instance.ebs_optimized %>
instance_type = "<%= instance.instance_type %>"
+<%- unless instance.placement.group_name.empty? -%>
+ placement_group = "<%= instance.placement.group_name %>"
+<%- end -%>
monitoring = <%= monitoring_state(instance) %>
key_name = "<%= instance.key_name %>"
<%- if in_vpc?(instance) -%>
subnet_id = "<%= instance.subnet_id %>"
vpc_security_group_ids = <%= instance.security_groups.map { |sg| sg.group_id }.inspect %>