Skip to content

Commit

Permalink
Add zoneName
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Graves committed Dec 23, 2023
1 parent 163b6c7 commit 0ce4eb6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import * as acm from "aws-cdk-lib/aws-certificatemanager";
import * as s3Deployment from "aws-cdk-lib/aws-s3-deployment";
import * as cloudfrontOrigins from "aws-cdk-lib/aws-cloudfront-origins";

const domainName = "stackline.isaac.works";
const zoneName = "isaac.works";
const domainName = `stackline.${zoneName}`;

export class Stack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
Expand All @@ -28,11 +29,11 @@ export class Stack extends cdk.Stack {
bucket.grantRead(originAccessIdentity);

const hostedZone = new route53.PublicHostedZone(this, `${id}HostedZone`, {
zoneName: domainName
zoneName
});

const certificate = new acm.Certificate(this, `${id}Certificate`, {
domainName: domainName,
domainName,
validation: acm.CertificateValidation.fromDns(hostedZone)
});

Expand Down

0 comments on commit 0ce4eb6

Please sign in to comment.