Skip to content

Commit

Permalink
feat(cdk-ops): configure env
Browse files Browse the repository at this point in the history
- Configures the `env` property of the CDK stack so that correct
  availability zones (AZs) in the region can be listed. CDK lists only
  two AZs without these changes.

issue codemonger-io#30
  • Loading branch information
kikuomax committed Oct 1, 2022
1 parent 58327f3 commit 344b6d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cdk-ops/bin/cdk-ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ resolveCodemongerResourceNames()
// env: { account: '123456789012', region: 'us-east-1' },

/* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */
env: {
// without the following properties `account` and `region`,
// the stack becomes "environment-agnostic."
// only two availability zones (AZs) are visible in an
// evironment-agnostic stack.
// https://docs.aws.amazon.com/cdk/v2/guide/environments.html
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION,
},
codemongerResourceNames: names,
tags: {
project: 'codemonger',
Expand Down

0 comments on commit 344b6d3

Please sign in to comment.