-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add commons Stack with DNS and certificate (#143)
Signed-off-by: Sayali Gaikawad <[email protected]>
- Loading branch information
Showing
7 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Copyright OpenSearch Contributors | ||
SPDX-License-Identifier: Apache-2.0 | ||
The OpenSearch Contributors require contributions made to | ||
this file be licensed under the Apache-2.0 license or a | ||
compatible open source license. */ | ||
|
||
import { Stack, StackProps } from 'aws-cdk-lib'; | ||
import { Certificate, CertificateValidation } from 'aws-cdk-lib/aws-certificatemanager'; | ||
import { HostedZone } from 'aws-cdk-lib/aws-route53'; | ||
import { Construct } from 'constructs'; | ||
|
||
export class CommonToolsStack extends Stack { | ||
readonly certificateArn: string | ||
|
||
constructor(scope: Construct, id: string, props: StackProps) { | ||
super(scope, id, props); | ||
const zone = 'playground.nightly.opensearch.org'; | ||
|
||
const route53HostedZone = new HostedZone(this, 'nigghhtlyHostedZone', { | ||
zoneName: zone, | ||
}); | ||
|
||
const certificate = new Certificate(this, 'cert', { | ||
domainName: zone, | ||
validation: CertificateValidation.fromDns(route53HostedZone), | ||
}); | ||
this.certificateArn = certificate.certificateArn; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters