module Cumulus::Route53

Constants

AliasTarget

Public: A struct that matches the structure of the AWS alias target struct

Vpc

Public Instance Methods

init_aws_resources() click to toggle source
# File lib/route53/manager/Manager.rb, line 226
def init_aws_resources
  more = true
  marker = nil
  aws = {}
  while more do
    result = @route53.list_hosted_zones(marker: marker)
    result.hosted_zones.each do |zone|
      vpc = if zone.config.private_zone
              details = @route53.get_hosted_zone(id: zone.id)
              details.vp_cs.map { |v| Vpc.new(v.vpc_id, v.vpc_region) }
            else
              nil
            end
      aws[zone.id] = AwsZone.new(zone.id, zone.name.chomp("."), zone.config, vpc, @route53)
    end
    marker = result.next_marker
    more = result.is_truncated
  end
  aws
end