implement login example

This commit is contained in:
2025-06-21 11:36:56 +09:00
parent 6bb4081c20
commit 1e54f969a0
11 changed files with 2434 additions and 21 deletions

View File

@@ -91,6 +91,14 @@ const codebuild = new aws.codebuild.Project(`${prefix}-codebuild`, {
image: "aws/codebuild/standard:7.0",
type: "LINUX_CONTAINER",
environmentVariables: [
{
name: "IMBUSY_REGION",
value: aws.config.region!,
},
{
name: "IMBUSY_BE_USERPOOL",
value: backend.userPool.id,
},
{
name: "IMBUSY_BE_USERPOOL_CLI",
value: backend.userPoolClient.id,
@@ -107,10 +115,6 @@ const codebuild = new aws.codebuild.Project(`${prefix}-codebuild`, {
name: "IMBUSY_FE_BUCKET",
value: frontend.bucket.bucket,
},
{
name: "IMBUSY_FE_USERPOOL_URL",
value: frontend.userPoolUrl,
},
],
},
serviceRole: role.arn,

View File

@@ -76,12 +76,3 @@ export const cloudfront = new aws.cloudfront.Distribution(`${prefix}-cloudfront`
cloudfrontDefaultCertificate: true,
},
});
// ---- cognito domain ----
const userPoolDomain = new aws.cognito.UserPoolDomain(`${prefix}-userpool-domain`, {
domain: "imbusy-auth",
userPoolId: backend.userPool.id,
});
export const userPoolUrl =
pulumi.interpolate`https://${userPoolDomain.domain}.auth.${aws.config.region}.amazoncognito.com`;

View File

@@ -6,11 +6,13 @@ import * as frontend from "./frontend";
import "./deployment";
export const region = aws.config.region;
export const feBucket = frontend.bucket.bucket;
export const feDomain = frontend.cloudfront.domainName;
export const beBucket = backend.bucket.bucket;
export const beLambda = backend.lambda.name;
export const beEndpoint = backend.api.apiEndpoint;
export const feUserPoolUrl = frontend.userPoolUrl;
export const beUserPool = backend.userPool.id;
export const beUserPoolCli = backend.userPoolClient.id;