-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add split horizon dns construct #37
base: main
Are you sure you want to change the base?
feat: add split horizon dns construct #37
Conversation
src/aws-route53/split-horizon-dns.ts
Outdated
} else if (existingPrivateZone) { | ||
this.privateZone = existingPrivateZone; | ||
} else { | ||
this.privateZone = new route53.HostedZone(this, 'PrivateZone', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extract the creation of sub-constructs into a factory method that can be overridden in a subclass
src/aws-route53/split-horizon-dns.ts
Outdated
} | ||
|
||
if (includeCertificate) { | ||
this.certificate = new acm.Certificate(this, 'Certificate', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extract the creation of sub-constructs into a factory method that can be overridden in a subclass
src/aws-route53/split-horizon-dns.ts
Outdated
if (existingPublicZone) { | ||
this.publicZone = existingPublicZone; | ||
} else { | ||
this.publicZone = new route53.HostedZone(this, 'PublicZone', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extract the creation of sub-constructs into a factory method that can be overridden in a subclass
@IamFlowZ are you still working on this PR? |
Apologies for the delay. I believe I've got those methods added, I followed the |
src/aws-route53/split-horizon-dns.ts
Outdated
|
||
protected createHostedZone(zoneId: string, props: createHostedZoneProps): route53.IHostedZone { | ||
return new route53.HostedZone(this, zoneId, { | ||
zoneName: props.zoneName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this just be (this, zoneId, props)
?
|
||
public certificate?: acm.ICertificate; | ||
|
||
constructor(scope: Construct, id: string, private props: ISplitHorizonDnsProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make this protected so sub-classes can access this info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I follow why a protected constructor is needed here?
Fixes #
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license