hostedZoneNameServers can be undefined in PublicHostedZone
See original GitHub issueReproduction Steps
Using Route53 > PublicHostedZone.hostedZoneNameServers.
Unfortunatly, I can’t export these NS as a CfnOutput because hostedZoneNameServers can be undifiened (why ? I’m using PublicHostedZone) :
Type 'undefined' is not assignable to type 'string'
And I have to set NS as records in another account (who drive the Main Public HostedZone).
So, is it a bug for the PublicHostedZone ? And of course, can’t write the output in a file (with CDK –outputs-file) to use it in my other Account.
So, what can I do ?
Thanks in advance.
Environment
- CLI Version : CDK 1.42.1 (build a4797b4)
- Framework Version: 6.14.5
- Node.js Version: v12.15.0
- OS : Linux
- Language (Version): TypeScript
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
class PublicHostedZone (construct) · AWS CDK
Returns the set of name servers for the specific hosted zone. For example: ns1.example.com. This attribute will be undefined for private hosted zones...
Read more >AWS CDK -- How do I retrieve my NS Records from my newly ...
There is a hostedZoneNameServers property on the zone object. ... This attribute will be undefined for private hosted zones or hosted zones ...
Read more >awsroute53 - Go Packages
func NewPublicHostedZone_Override(p PublicHostedZone, scope constructs. ... This attribute will be undefined for private hosted zones or ...
Read more >Package Diff: @aws-cdk/aws-route53 @ 0.31.0 .. 0.32.0
export declare class PublicHostedZone extends HostedZone implements IPublicHostedZone { ... You can. * associated additional VPCs using `addVpc(vpc)`.
Read more >Creating a Route 53 Public Hosted Zone with a reusable ...
However: each time you re-create a Route 53 hosted zone, the DNS nameservers allocated will change. If you're using CloudFormation to manage ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Cloudrage
PublicHostedZone
implementsIHostedZone
which represents the properties for all hosted zones. The reason the property may be undefined is because any hosted zone should be usable in an API that accepts IHostedZone.Can you share the code that you’re trying to write and use. Assuming it was defined, you’re still attempting to assign a list of strings to the
value
property to your output which only allows typestring
.something like the following is what you’d want to do - sketch
let me know how it goes!
Yes you’re right ! It’s working with your proposal; many thanks.
So, now to be perfect, we need to have the capability to get CloudFormation Outputs between accounts; because actually, I’ve to get the output from a file in the Repo. So it means that the “Builder” (another one than me) have to launch CDK with the correct option (that implies that the entire code can’t be valid until prerequisites resources & outputs are created. So, some snippets have to be comment…).