Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.
Open
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
1 change: 1 addition & 0 deletions templates/infra/deploy.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cd infra
npm install
npx cdk bootstrap

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I have one question. Which aws account/region will this bootstrap happen? I'm thinking it will happen on the default account on the user computer, but I'm not sure. I've taken a look at the docs and I think it will be necessary to use the stage info in this command.
cdk bootstrap aws://ACCOUNT-NUMBER-1/REGION-1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct.

When we run the bootstrap command, it uses these variables to deploy the CDK stack into the cloud formation in the region provided by the AWS_DEFAULT_REGION environment variable.

The problem is that the bootstrap command doesn't have a good way to override/extends the configurations as we do in /bin/infra.ts

I have only seen one way passing the --profile parameter, but it would take more configuration to create these profiles.

What do you think? Do you see any way to pass these variables dynamically to the bootstrap command?

npx cdk deploy -c stage=%1
1 change: 1 addition & 0 deletions templates/infra/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cd infra
npm install
npx cdk bootstrap
npx cdk deploy -c stage=$1