Skip to content
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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

IamFlowZ
Copy link

@IamFlowZ IamFlowZ commented Jun 14, 2024

Fixes #

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@IamFlowZ IamFlowZ changed the title Feat add split horizon dns construct feat add split horizon dns construct Jun 14, 2024
@IamFlowZ IamFlowZ changed the title feat add split horizon dns construct feat: add split horizon dns construct Jun 14, 2024
} else if (existingPrivateZone) {
this.privateZone = existingPrivateZone;
} else {
this.privateZone = new route53.HostedZone(this, 'PrivateZone', {
Copy link
Contributor

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

}

if (includeCertificate) {
this.certificate = new acm.Certificate(this, 'Certificate', {
Copy link
Contributor

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

if (existingPublicZone) {
this.publicZone = existingPublicZone;
} else {
this.publicZone = new route53.HostedZone(this, 'PublicZone', {
Copy link
Contributor

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

@hoegertn
Copy link
Contributor

@IamFlowZ are you still working on this PR?

@IamFlowZ
Copy link
Author

IamFlowZ commented Oct 2, 2024

Apologies for the delay. I believe I've got those methods added, I followed the instance-connect-endpoint construct as an example. So let me know if I misunderstood anything.

@IamFlowZ IamFlowZ requested a review from hoegertn October 7, 2024 13:38

protected createHostedZone(zoneId: string, props: createHostedZoneProps): route53.IHostedZone {
return new route53.HostedZone(this, zoneId, {
zoneName: props.zoneName,
Copy link
Contributor

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) {
Copy link
Contributor

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

Copy link
Author

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?

@IamFlowZ IamFlowZ requested a review from hoegertn October 28, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants