Sha256: df2ca4adf8c79d1c18a36e3e70900713026b7776f8044ef2f8d071b64e0bf15c

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

<% instances.each do |instance| -%>
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 %>"
    key_name                    = "<%= instance.key_name %>"
    security_groups             = <%= instance.security_groups.map { |sg| sg.group_id }.inspect %>
    subnet_id                   = "<%= instance.subnet_id %>"
    associate_public_ip_address = true
    private_ip                  = "<%= instance.private_ip_address %>"
    source_dest_check           = <%= instance.source_dest_check %>

<% instance.block_device_mappings.each do |block_device| -%>
    ebs_block_device {
        device_name = "<%= block_device.device_name %>"
    }

<% end -%>
    tags {
<% instance.tags.each do |tag| -%>
        "<%= tag.key %>" = "<%= tag.value %>"
<% end -%>
    }
}

<% end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
terraforming-0.1.1 lib/terraforming/template/tf/ec2.erb
terraforming-0.1.0 lib/terraforming/template/tf/ec2.erb
terraforming-0.0.5 lib/terraforming/template/tf/ec2.erb