Sha256: f71ae7d759feaa168d934295a498c723dbc7530642921962b8db70774b8dca4d

Contents?: true

Size: 1.13 KB

Versions: 11

Compression:

Stored size: 1.13 KB

Contents

<% load_balancers.each do |load_balancer| -%>
  <%- load_balancer_attributes = load_balancer_attributes_of(load_balancer) -%>
  <%- tags = tags_of(load_balancer) -%>
resource "aws_alb" "<%= module_name_of(load_balancer) %>" {
    idle_timeout    = <%= load_balancer_attributes["idle_timeout.timeout_seconds"] %>
    internal        = <%= internal?(load_balancer).to_s %>
    name            = "<%= load_balancer.load_balancer_name %>"
    security_groups = <%= load_balancer.security_groups.inspect %>
    subnets         = <%= load_balancer.availability_zones.map { |az| az.subnet_id }.inspect %>

    enable_deletion_protection = <%= load_balancer_attributes["deletion_protection.enabled"].to_s %>

<%- if load_balancer_attributes["access_logs.s3.enabled"] == "true" -%>
    access_logs {
        bucket  = "<%= load_balancer_attributes["access_logs.s3.bucket"] %>"
        enabled = <%= load_balancer_attributes["access_logs.s3.enabled"] %>
        prefix  = "<%= load_balancer_attributes["access_logs.s3.prefix"] %>"
    }

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

<% end -%>

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
terraforming-0.18.0 lib/terraforming/template/tf/alb.erb
terraforming-0.17.0 lib/terraforming/template/tf/alb.erb
terraforming-0.16.0 lib/terraforming/template/tf/alb.erb
terraforming-0.15.0 lib/terraforming/template/tf/alb.erb
aws-insight-0.14.1 lib/terraforming/template/tf/alb.erb
aws-insight-0.14.0 lib/terraforming/template/tf/alb.erb
terraforming-0.14.0 lib/terraforming/template/tf/alb.erb
terraforming-0.13.2 lib/terraforming/template/tf/alb.erb
terraforming-0.13.1 lib/terraforming/template/tf/alb.erb
terraforming-0.13.0 lib/terraforming/template/tf/alb.erb
terraforming-0.12.0 lib/terraforming/template/tf/alb.erb