implement login example
This commit is contained in:
@@ -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,
|
||||
|
@@ -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`;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user