Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

---

- Added an option to exclude the alb deployment on a specific workload account

```
"workload-account-configs": {
"fun-acct": {
"exclude-ou-albs": true
}
}
```

---

- Update Central Logging Kinesis stream shard count as accounts are added

```
Expand Down
10 changes: 9 additions & 1 deletion src/deployments/cdk/src/deployments/alb/step-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,19 @@ export async function step1(props: AlbStep1Props) {
});

const vpcConfigs = config.getVpcConfigs();
for (const { accountKey, albs: albConfigs } of config.getAlbConfigs()) {
for (const { ouKey, accountKey, albs: albConfigs } of config.getAlbConfigs()) {
if (albConfigs.length === 0) {
continue;
}

if (ouKey) {
const accountConfigs = config.getAccountConfigsForOu(ouKey);
const accountConfig = accountConfigs.find(([aKey, _]) => aKey === accountKey);
if (accountConfig && accountConfig[1]['exclude-ou-albs']) {
continue;
}
}

for (const albConfig of albConfigs) {
const vpcConfig = vpcConfigs.find(v => v.vpcConfig.name === albConfig.vpc)?.vpcConfig;
if (!vpcConfig) {
Expand Down
1 change: 1 addition & 0 deletions src/lib/common-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ export const MandatoryAccountConfigType = t.interface({
'cwl-retention': optional(t.number),
deleted: fromNullable(t.boolean, false),
'src-filename': t.string,
'exclude-ou-albs': optional(t.boolean),
});

export type MandatoryAccountConfig = t.TypeOf<typeof MandatoryAccountConfigType>;
Expand Down