Skip to content

Commit

Permalink
OPHYK-482 viestinvalitys data is not yet available and breaks the rad…
Browse files Browse the repository at this point in the history
…iator

This reverts commit ca88bee.
  • Loading branch information
tsu committed Feb 19, 2025
1 parent ca88bee commit ca3bb36
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions docs/codepipeline-radiator-data-fetching.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ async function fetchRadiatorData() {
const koodistoCredentials = new AWS.ChainableTemporaryCredentials({
params: {RoleArn: 'arn:aws:iam::288761775028:role/RadiatorReader'}
})
const viestinvalitysCredentials = new AWS.ChainableTemporaryCredentials({
params: {RoleArn: 'arn:aws:iam::970547337888:role/RadiatorReader'}
})

async function mkEnv(roleName, adminRole) {
const credentials = new AWS.ChainableTemporaryCredentials({params: {RoleArn: roleName}})
Expand Down Expand Up @@ -64,18 +61,6 @@ async function fetchRadiatorData() {
prod: mkEnv('arn:aws:iam::266735801024:role/RadiatorReader', 'AdministratorAccess'),
}
}
const viestinvalitys = {
accountName: 'Viestinvalitys',
accountId: await getAccountId(viestinvalitysCredentials),
adminRole: 'AdministratorAccess',
codepipeline: new AWS.CodePipeline({credentials: viestinvalitysCredentials}),
environments: {
hahtuva: mkEnv('arn:aws:iam::850995576855:role/RadiatorReader', 'AdministratorAccess'),
dev: mkEnv('arn:aws:iam::329599639609:role/RadiatorReader', 'AdministratorAccess'),
qa: mkEnv('arn:aws:iam::897722701572:role/RadiatorReader', 'AdministratorAccess'),
prod: mkEnv('arn:aws:iam::820242935473:role/RadiatorReader', 'AdministratorAccess'),
}
}
const palveluvayla = {
accountName: 'Palveluväylä',
accountId: await getAccountId(palveluvaylaCredentials),
Expand All @@ -88,8 +73,8 @@ async function fetchRadiatorData() {
}
}

const accounts = [yleiskayttoisetPalvelut, organisaatio, koodisto, viestinvalitys, palveluvayla]
return {accounts: await Promise.all(accounts.map(fetchAccountState))}
const accounts = [yleiskayttoisetPalvelut, organisaatio, koodisto, palveluvayla]
return { accounts: await Promise.all(accounts.map(fetchAccountState)) }
}

async function fetchAccountState(account) {
Expand Down

0 comments on commit ca3bb36

Please sign in to comment.