Skip to content

Commit

Permalink
"Cfn Outputの追加"
Browse files Browse the repository at this point in the history
  • Loading branch information
Kota8102 committed May 18, 2024
1 parent 06be380 commit 2af8009
Show file tree
Hide file tree
Showing 3 changed files with 2,271 additions and 26 deletions.
3 changes: 3 additions & 0 deletions src/backend/lib/backend-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ export class BackendStack extends cdk.Stack {
identityPool: identity.identityPool,
});

new cdk.CfnOutput(this, 'WebFrontend', {
value: `https://${web.distribution.distributionDomainName}`,
})
}
}
3 changes: 3 additions & 0 deletions src/backend/lib/constructs/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface WebProps {
}

export class Web extends Construct {
public readonly distribution: cloudfront.Distribution;

constructor(scope: Construct, id: string, props: WebProps) {
super(scope, id);
Expand Down Expand Up @@ -75,5 +76,7 @@ export class Web extends Construct {
REACT_APP_USER_POOL_CLIENT_ID: props.userPoolClient.userPoolClientId,
}
});

this.distribution = cloudFrontWebDistribution;
}
}
Loading

0 comments on commit 2af8009

Please sign in to comment.