Sha256: f30f33493aa664e8062b95c3cbf3bebbf4aeda85cb881b271dcb690016b6bf97

Contents?: true

Size: 563 Bytes

Versions: 22

Compression:

Stored size: 563 Bytes

Contents

# frozen_string_literal: true

module Sumomo
  module Stack
    def cloudflare_hosted_zone(domain_name:, key:, email:)
      root_name = /(?<root_name>[^.]+\.[^.]+)$/.match(domain_name)[:root_name]

      hz = make 'AWS::Route53::HostedZone' do
        Name domain_name
      end

      (0..3).each do |i|
        make 'Custom::CloudflareDNSEntry' do
          Key key
          Email email
          Domain root_name
          Entry domain_name.sub(/#{root_name}$/, '').chomp('.')
          NS hz.NameServers[i]
        end
      end

      hz
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
sumomo-0.10.8 lib/sumomo/dns.rb
sumomo-0.10.4 lib/sumomo/dns.rb
sumomo-0.10.3 lib/sumomo/dns.rb
sumomo-0.10.2 lib/sumomo/dns.rb
sumomo-0.10.1 lib/sumomo/dns.rb
sumomo-0.10.0 lib/sumomo/dns.rb
sumomo-0.9.0 lib/sumomo/dns.rb
sumomo-0.8.22 lib/sumomo/dns.rb
sumomo-0.8.21 lib/sumomo/dns.rb
sumomo-0.8.20 lib/sumomo/dns.rb
sumomo-0.8.17 lib/sumomo/dns.rb
sumomo-0.8.16 lib/sumomo/dns.rb
sumomo-0.8.15 lib/sumomo/dns.rb
sumomo-0.8.14 lib/sumomo/dns.rb
sumomo-0.8.13 lib/sumomo/dns.rb
sumomo-0.8.12 lib/sumomo/dns.rb
sumomo-0.8.11 lib/sumomo/dns.rb
sumomo-0.8.10 lib/sumomo/dns.rb
sumomo-0.8.9 lib/sumomo/dns.rb
sumomo-0.8.8 lib/sumomo/dns.rb