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