Skip to content

Commit

Permalink
make admin sub account agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvpickering committed Aug 24, 2022
1 parent 8a11ae7 commit 5056c23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/api.v2/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ const ACCOUNT_ID = {
HMS: '160782110667',
};

const ADMIN_SUB = {
BIOMAGE: '032abd44-0cd3-4d58-af21-850ca0b95ac7',
HMS: 'a01e8bcc-c9a2-4c56-bd66-39de93764be8',

};

module.exports = {
QC_PROCESS_NAME,
GEM2S_PROCESS_NAME,
Expand All @@ -47,4 +53,5 @@ module.exports = {
ASSIGN_POD_TO_PIPELINE,
EXPIRED_EXECUTION_DATE,
ACCOUNT_ID,
ADMIN_SUB,
};
3 changes: 2 additions & 1 deletion src/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const AWS = require('aws-sdk');
const getLogger = require('../utils/getLogger');

const logger = getLogger();
const { ACCOUNT_ID, ADMIN_SUB } = require('../api.v2/constants');

const githubOrganisationName = 'hms-dbmi-cellenics';

Expand Down Expand Up @@ -78,7 +79,7 @@ const config = {
pipelineInstanceConfigUrl: `https://raw.githubusercontent.com/${githubOrganisationName}/iac/master/releases/production/pipeline.yaml`,
cachingEnabled: true,
corsOriginUrl: `https://${domainName}`,
adminSub: '032abd44-0cd3-4d58-af21-850ca0b95ac7',
adminSub: process.env.AWS_ACCOUNT_ID === ACCOUNT_ID.HMS ? ADMIN_SUB.HMS : ADMIN_SUB.BIOMAGE,
};


Expand Down

0 comments on commit 5056c23

Please sign in to comment.