Sha256: 07cc97689ee5defba4b78531b43493bff42bd1a12c7b1607b5017d9397bb3b0e

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

<% records.each do |r| -%>
  <%- record, zone_id = r[:record], r[:zone_id] -%>
  <%- counter = r[:counter] -%>
resource "aws_route53_record" "<%= module_name_of(record, counter) %>" {
    zone_id = "<%= zone_id %>"
    name    = "<%= name_of(record.name.sub(/\\052/, '*')) %>"
    type    = "<%= record.type %>"
<%- unless record.resource_records.empty? -%>
    records = <%= record.resource_records.map(&:value).to_s %>
<%- end -%>
<%- if record.ttl -%>
    ttl     = "<%= record.ttl %>"
<%- end -%>
<%- if record.weight -%>
    weighted_routing_policy {
        weight = <%= record.weight %>
    }
<%- end -%>
<%- if record.region -%>
    latency_routing_policy {
        region = "<%= record.region %>"
    }
<%- end -%>
<%- if record.geo_location -%>
    geolocation_routing_policy {
  <%- if record.geo_location.continent_code -%>
        continent = "<%= record.geo_location.continent_code %>"
  <%- end -%>
  <%- if record.geo_location.country_code -%>
        country = "<%= record.geo_location.country_code %>"
  <%- end -%>
  <%- if record.geo_location.subdivision_code -%>
        subdivision = "<%= record.geo_location.subdivision_code %>"
  <%- end -%>
    }
<%- end -%>
<%- if record.set_identifier -%>
    set_identifier = "<%= record.set_identifier %>"
<%- end -%>

    <%- if record.alias_target -%>
    alias {
        name    = "<%= name_of(record.alias_target.dns_name)
 %>"
        zone_id = "<%= record.alias_target.hosted_zone_id %>"
        evaluate_target_health = <%= record.alias_target.evaluate_target_health %>
    }
    <%- end -%>
}

<% end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
terraforming-0.13.1 lib/terraforming/template/tf/route53_record.erb