Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make admin sub account agnostic #409

Merged
merged 6 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = {
[ACCOUNT_ID.Biomage]: '032abd44-0cd3-4d58-af21-850ca0b95ac7',
[ACCOUNT_ID.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 { 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: ADMIN_SUB[process.env.AWS_ACCOUNT_ID],
alexvpickering marked this conversation as resolved.
Show resolved Hide resolved
};


Expand Down