Skip to content

Commit

Permalink
fix: Korjaa ajansiirtopainikkeet (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkork authored Feb 13, 2023
1 parent 9dfc036 commit 5aeb772
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deployment/bin/setupEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function main() {
TABLE_PROJEKTI: Config.projektiTableName,
TABLE_FEEDBACK: Config.feedbackTableName,
INTERNAL_BUCKET_NAME: Config.internalBucketName,

AINEISTO_IMPORT_SQS_URL: backendStackOutputs.AineistoImportSqsUrl,
...environmentVariables,
});

Expand All @@ -43,6 +43,7 @@ async function main() {
SEARCH_DOMAIN: accountStackOutputs.SearchDomainEndpointOutput,
TABLE_PROJEKTI: Config.projektiTableName,
TABLE_FEEDBACK: Config.feedbackTableName,
AINEISTO_IMPORT_SQS_URL: backendStackOutputs.AineistoImportSqsUrl,
NEXT_PUBLIC_VELHO_BASE_URL: environmentVariables.NEXT_PUBLIC_VELHO_BASE_URL,
});
}
Expand Down
4 changes: 4 additions & 0 deletions deployment/lib/hassu-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type HassuBackendStackProps = {
export type BackendStackOutputs = {
AppSyncAPIKey?: string;
AppSyncAPIURL: string;
AineistoImportSqsUrl: string;
};

export const backendStackName = "hassu-backend-" + Config.env;
Expand Down Expand Up @@ -118,6 +119,9 @@ export class HassuBackendStack extends Stack {
new CfnOutput(this, "AppSyncAPIKey", {
value: api.apiKey || "",
});
new CfnOutput(this, "AineistoImportSqsUrl", {
value: aineistoSQS.queueUrl || "",
});
if (Config.isDeveloperEnvironment()) {
new CfnOutput(this, "AppSyncAPIURL", {
value: api.graphqlUrl || "",
Expand Down
2 changes: 2 additions & 0 deletions deployment/lib/hassu-frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class HassuFrontendStack extends Stack {
this.cloudFrontOriginAccessIdentityReportBucket = (await readPipelineStackOutputs()).CloudfrontOriginAccessIdentityReportBucket || ""; // Empty default string for localstack deployment

const accountStackOutputs = await readAccountStackOutputs();
const { AineistoImportSqsUrl } = await readBackendStackOutputs();

await new Builder(".", "./build", {
enableHTTPCompression: true,
Expand All @@ -91,6 +92,7 @@ export class HassuFrontendStack extends Stack {
TABLE_PROJEKTI: Config.projektiTableName,
SEARCH_DOMAIN: accountStackOutputs.SearchDomainEndpointOutput,
INTERNAL_BUCKET_NAME: Config.internalBucketName,
AINEISTO_IMPORT_SQS_URL: AineistoImportSqsUrl,
},
}).build();

Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ module.exports = (phase) => {
ENVIRONMENT: BaseConfig.env,
TABLE_PROJEKTI: BaseConfig.projektiTableName,
INTERNAL_BUCKET_NAME: BaseConfig.internalBucketName,
AINEISTO_IMPORT_SQS_URL: process.env.AINEISTO_IMPORT_SQS_URL,
};

if (BaseConfig.env !== "prod") {
Expand Down

0 comments on commit 5aeb772

Please sign in to comment.