Skip to content

Commit

Permalink
CMDCT-4254 - gets run local working
Browse files Browse the repository at this point in the history
  • Loading branch information
peoplespete committed Jan 24, 2025
1 parent 6bd1f8f commit d866024
Show file tree
Hide file tree
Showing 11 changed files with 2,862 additions and 3,028 deletions.
10 changes: 10 additions & 0 deletions .env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ CYPRESS_ADMIN_USER=op://mdct_devs/qmr_secrets/CYPRESS_ADMIN_USER
CYPRESS_QMR_PASSWORD=op://mdct_devs/qmr_secrets/CYPRESS_QMR_PASSWORD # pragma: allowlist secret

SERVERLESS_LICENSE_KEY=op://mdct_devs/qmr_secrets/SERVERLESS_LICENSE_KEY

# SSM Section
bootstrapBrokerStringTls=bootstrapBrokerStringTls
vpcId=vpcId
privateSubnetAId=privateSubnetAId
privateSubnetBId=privateSubnetBId
privateSubnetCId=privateSubnetCId
mpriamrole=mpriamrole
mprdeviam=mprdeviam
s3SyncFrequency=low
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ package-lock.json
tests/cypress/.env
tests/cypress/cypress.env.json
.vscode
/.serverless
/.cdk
cdk.context.json
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
"serverless-bundle": "^6.0.0",
"serverless-dotenv-plugin": "^4.0.0",
"serverless-iam-helper": "github:Enterprise-CMCS/serverless-iam-helper",
"serverless-offline": "^13.5.0",
"serverless-offline-ssm": "^6.2.0",
"serverless-offline": "^14.4.0",
"serverless-plugin-scripts": "^1.0.2",
"serverless-s3-bucket-helper": "Enterprise-CMCS/serverless-s3-bucket-helper#0.1.0",
"serverless-stack-termination-protection": "^1.0.4",
Expand Down
2 changes: 2 additions & 0 deletions serverless-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# "org" ensures this Service is used with the correct Serverless Framework License Key.
org: macbis
services:
# wave 1: no dependencies
database:
Expand Down
17 changes: 5 additions & 12 deletions services/app-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@ package:
plugins:
- serverless-associate-waf
- "@enterprise-cmcs/serverless-waf-plugin"
- serverless-offline-ssm
- serverless-offline
- serverless-stack-termination-protection
- serverless-iam-helper
- serverless-dotenv-plugin

custom:
project: "qmr"
serverless-offline-ssm:
stages:
- local
ssm:
"/s3bucket/uploads": "local-uploads"
"/s3bucket/snapshots": "local-dynamo-snapshots"
serverlessPluginTypescript:
tsConfigFileLocation: "./tsconfig.json"
stage: ${opt:stage, self:provider.stage}
Expand All @@ -40,7 +33,7 @@ custom:
dotenv:
path: ../../.env
docraptorApiKey: ${env:docraptorApiKey, ssm:/${self:custom.stage}/pdf/docraptorApiKey, ssm:/default/pdf/docraptorApiKey}
bootstrapBrokerStringTls: ${ssm:/configuration/${self:custom.stage}/qmr/bootstrapBrokerStringTls, ssm:/configuration/default/qmr/bootstrapBrokerStringTls, ''}
bootstrapBrokerStringTls: ${env:bootstrapBrokerStringTls, ssm:/configuration/${self:custom.stage}/qmr/bootstrapBrokerStringTls, ssm:/configuration/default/qmr/bootstrapBrokerStringTls, ''}
measureTable: ${env:measureTable, param:MeasureTable}
coreSetTable: ${env:coreSetTable, param:CoreSetTable}
rateTable: ${env:rateTable, param:RateTable}
Expand All @@ -49,11 +42,11 @@ custom:
coreSetTableStreamArn: ${env:DYNAMO_TABLE_ARN, param:CoreSetTableStreamArn}
rateTableStreamArn: ${env:DYNAMO_TABLE_ARN, param:RateTableStreamArn}
webAclName: ${self:service}-${self:custom.stage}-webacl-waf
vpcId: ${ssm:/configuration/${self:custom.stage}/vpc/id, ssm:/configuration/default/vpc/id, ''}
vpcId: ${env:vpcId, ssm:/configuration/${self:custom.stage}/vpc/id, ssm:/configuration/default/vpc/id, ''}
privateSubnets:
- ${ssm:/configuration/${self:custom.stage}/vpc/subnets/private/a/id, ssm:/configuration/default/vpc/subnets/private/a/id, ''}
- ${ssm:/configuration/${self:custom.stage}/vpc/subnets/private/b/id, ssm:/configuration/default/vpc/subnets/private/b/id, ''}
- ${ssm:/configuration/${self:custom.stage}/vpc/subnets/private/c/id, ssm:/configuration/default/vpc/subnets/private/c/id, ''}
- ${env:privateSubnetAId, ssm:/configuration/${self:custom.stage}/vpc/subnets/private/a/id, ssm:/configuration/default/vpc/subnets/private/a/id, ''}
- ${env:privateSubnetBId, ssm:/configuration/${self:custom.stage}/vpc/subnets/private/b/id, ssm:/configuration/default/vpc/subnets/private/b/id, ''}
- ${env:privateSubnetCId, ssm:/configuration/${self:custom.stage}/vpc/subnets/private/c/id, ssm:/configuration/default/vpc/subnets/private/c/id, ''}
associateWaf:
name: ${self:custom.webAclName}
version: V2
Expand Down
2 changes: 1 addition & 1 deletion services/ui-auth/handlers/createUsers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as cognitolib from "../libs/cognito-lib.js";
import { users } from "../libs/users.js";
import users from "../libs/users.json" assert { type: "json" };
const userPoolId = process.env.userPoolId;

export const handler = async (event, context, callback) => {
Expand Down
Loading

0 comments on commit d866024

Please sign in to comment.