From 93c55dbd947a5f77b5da2d71e5f0d3ccd1395103 Mon Sep 17 00:00:00 2001 From: Tomi Korkalainen <77731851+tkork@users.noreply.github.com> Date: Tue, 14 Feb 2023 13:58:10 +0200 Subject: [PATCH] fix: Aseta frontend lukemaan aineisto_import_sqs_url backend outputista (#602) --- deployment/lib/hassu-frontend.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/deployment/lib/hassu-frontend.ts b/deployment/lib/hassu-frontend.ts index ff6fb64ca..c7930f780 100644 --- a/deployment/lib/hassu-frontend.ts +++ b/deployment/lib/hassu-frontend.ts @@ -50,7 +50,6 @@ export const frontendStackName = "hassu-frontend-" + Config.env; export class HassuFrontendStack extends Stack { private props: HassuFrontendStackProps; - private appSyncAPIKey?: string; private cloudFrontOriginAccessIdentity!: string; private cloudFrontOriginAccessIdentityReportBucket!: string; @@ -75,7 +74,7 @@ export class HassuFrontendStack extends Stack { const env = Config.env; const config = await Config.instance(this); - this.appSyncAPIKey = (await readBackendStackOutputs()).AppSyncAPIKey; + const { AppSyncAPIKey, AineistoImportSqsUrl } = await readBackendStackOutputs(); this.cloudFrontOriginAccessIdentity = (await readDatabaseStackOutputs()).CloudFrontOriginAccessIdentity || ""; // Empty default string for localstack deployment this.cloudFrontOriginAccessIdentityReportBucket = (await readPipelineStackOutputs()).CloudfrontOriginAccessIdentityReportBucket || ""; // Empty default string for localstack deployment @@ -89,11 +88,11 @@ export class HassuFrontendStack extends Stack { // Nämä muuttujat pitää välittää toteutukselle next.config.js:n kautta ENVIRONMENT: Config.env, FRONTEND_DOMAIN_NAME: config.frontendDomainName, - REACT_APP_API_KEY: this.appSyncAPIKey, + REACT_APP_API_KEY: AppSyncAPIKey, TABLE_PROJEKTI: Config.projektiTableName, SEARCH_DOMAIN: accountStackOutputs.SearchDomainEndpointOutput, INTERNAL_BUCKET_NAME: Config.internalBucketName, - AINEISTO_IMPORT_SQS_URL: this.props.aineistoImportQueue.queueUrl, + AINEISTO_IMPORT_SQS_URL: AineistoImportSqsUrl, }, }).build();