Skip to content

Commit

Permalink
fix root hosted zone
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerschloesser committed Jan 16, 2024
1 parent c2ef238 commit 9368eca
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions cdk/src/cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Distribution, ViewerProtocolPolicy } from 'aws-cdk-lib/aws-cloudfront'
import { S3Origin } from 'aws-cdk-lib/aws-cloudfront-origins'
import {
ARecord,
IHostedZone,
PublicHostedZone,
RecordSet,
RecordTarget,
Expand All @@ -32,17 +31,9 @@ export class CdkStack extends Stack {
zoneName: domainName,
})

let rootHostedZone: IHostedZone

if (process.env.STAGE === 'prod') {
rootHostedZone = new PublicHostedZone(this, 'RootHostedZone', {
zoneName: 'haitianrelief.org',
})
} else {
rootHostedZone = PublicHostedZone.fromLookup(this, 'RootHostedZone', {
domainName: 'haitianrelief.org',
})
}
const rootHostedZone = PublicHostedZone.fromLookup(this, 'RootHostedZone', {
domainName: 'haitianrelief.org',
})

let certificate: Certificate
if (process.env.STAGE === 'prod') {
Expand Down

0 comments on commit 9368eca

Please sign in to comment.