Add ability to specify HostedZoneID instead of HostedZoneName for Custom Domains
Closed this issue · 4 comments
wr0ngway commented
Summary
Currently, the custom domain feature only allows one to specify the HostedZoneName. This will not work when there are multiple domains with the same name, specifically both a public and private zone with the same name to allow internal dns to shadow the real domain.
From the AWS docs:
HostedZoneId
The ID of the hosted zone that you want to create the record in.
Specify either HostedZoneName or HostedZoneId, but not both. If you have multiple hosted zones with the same domain name, you must specify the hosted zone using HostedZoneId.
Required: No
Type: String
Maximum: 32
Update requires: Replacement
HostedZoneName
The name of the domain for the hosted zone where you want to add the record.
When you create a stack using an AWS::Route53::RecordSet that specifies HostedZoneName, AWS CloudFormation attempts to find a hosted zone whose name matches the HostedZoneName. If AWS CloudFormation cannot find a hosted zone with a matching domain name, or if there is more than one hosted zone with the specified domain name, AWS CloudFormation will not create the stack.
Specify either HostedZoneName or HostedZoneId, but not both. If you have multiple hosted zones with the same domain name, you must specify the hosted zone using HostedZoneId.
Required: No
Type: String
Maximum: 32
Update requires: Replacement
Motivation
Makes it easier to use jets in a pre-existing VPC
ibrokemylaughbox commented
may I try to help you ?
wr0ngway commented
Sure, I'm guessing this needs to change: https://github.com/tongueroo/jets/blob/master/lib/jets/resource/route53/record_set.rb#L22
To use a hosted_zone_id if it is set in application.rb config, and use hosted_zone_name otherwise
tongueroo commented
Yes
ibrokemylaughbox commented
i'll try to setup the environment today :D