Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
fix: use account type STAGE instead of OU names
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromevdl authored and flochaz committed Mar 1, 2022
1 parent bf62b34 commit decbba1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions source/aws-bootstrap-kit/lib/aws-organizations-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ export class AwsOrganizationsStack extends Stack {
previousSequentialConstruct = account;

// Building stageAccounts array to be used for DNS delegation system
// TODO would be better but doesnt work: if (accountSpec.type == AccountType.STAGE) {
if(['Prod', 'SDLC'].includes(oUSpec.name)) {
if (accountSpec.type == AccountType.STAGE) {
this.stageAccounts.push(account);
}
});
Expand Down
10 changes: 8 additions & 2 deletions source/aws-bootstrap-kit/test/aws-organizations-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,23 @@ const awsOrganizationsStackProps: AwsOrganizationsStackProps = {
{
name: "Account1",
stageName: 'theStage',
type: AccountType.STAGE,
stageOrder: 1
},
{
name: "Account2"
name: "Account2",
type: AccountType.STAGE,
stageOrder: 2
}
]
},
{
name: "Prod",
accounts: [
{
name: "Account3"
name: "Account3",
type: AccountType.STAGE,
stageOrder:3
}
]
}
Expand Down
1 change: 1 addition & 0 deletions source/aws-bootstrap-kit/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit decbba1

Please sign in to comment.