lib/terraforming/template/tf/ec2.erb in terraforming-0.10.0 vs lib/terraforming/template/tf/ec2.erb in terraforming-0.11.0
- old
+ new
@@ -25,24 +25,24 @@
<%- mapping = block_device_mapping_of(instance, block_device.volume_id) -%>
<%- if root_block_device?(mapping, instance) -%>
root_block_device {
volume_type = "<%= block_device.volume_type %>"
volume_size = <%= block_device.size %>
-<%- if block_device.iops -%>
+ delete_on_termination = <%= mapping.ebs.delete_on_termination %>
+<%- if block_device.volume_type == "io1" && block_device.iops -%>
iops = <%= block_device.iops %>
<%- end -%>
- delete_on_termination = <%= mapping.ebs.delete_on_termination %>
}
<%- else -%>
ebs_block_device {
device_name = "<%= mapping.device_name %>"
snapshot_id = "<%= block_device.snapshot_id %>"
volume_type = "<%= block_device.volume_type %>"
volume_size = <%= block_device.size %>
-<%- if block_device.iops -%>
+ delete_on_termination = <%= mapping.ebs.delete_on_termination %>
+<%- if block_device.volume_type == "io1" && block_device.iops -%>
iops = <%= block_device.iops %>
<%- end -%>
- delete_on_termination = <%= mapping.ebs.delete_on_termination %>
}
<% end -%>
<% end -%>
tags {