Looking at the CDK HostedZone's factory methods, the fromLookup method only requires a domainName, while fromHostedZoneAttributes, for some reason, requires both zone name and zone ID. Thus, if we use the former method, we don't have to mess with "injecting" a secret hosted zone ID and keeping it out of version control. Much simpler.
Looking at the CDK
HostedZone
's factory methods, thefromLookup
method only requires a domainName, whilefromHostedZoneAttributes
, for some reason, requires both zone name and zone ID. Thus, if we use the former method, we don't have to mess with "injecting" a secret hosted zone ID and keeping it out of version control. Much simpler.