diff --git a/src/api.v2/constants.js b/src/api.v2/constants.js index 66fcde157..2bf76b243 100644 --- a/src/api.v2/constants.js +++ b/src/api.v2/constants.js @@ -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, @@ -47,4 +53,5 @@ module.exports = { ASSIGN_POD_TO_PIPELINE, EXPIRED_EXECUTION_DATE, ACCOUNT_ID, + ADMIN_SUB, }; diff --git a/src/config/default-config.js b/src/config/default-config.js index f5659c7d4..cd5089b22 100644 --- a/src/config/default-config.js +++ b/src/config/default-config.js @@ -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'; @@ -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, };