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
  aws = @route53.list_hosted_zones.hosted_zones.map 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
    AwsZone.new(zone.id, zone.name.chomp("."), zone.config, vpc, @route53)
  end
  Hash[aws.map { |z| [z.id, z] }]
end