awslabs / app-development-for-backstage-io-on-aws

A developer portal to meet your Enterprise needs. Fast, secure, and at-scale.
https://opaonaws.io/
Apache License 2.0
158 stars 28 forks source link

add CDK Bootstrap for initiating providers #75

Closed arditti closed 4 months ago

arditti commented 4 months ago

In order to avoid end-user to manually cdk bootstrap each account and region, add cdk bootstrap as part of creating new providers

awsjim commented 4 months ago

Hey @arditti 👋 This is a great improvement and will save a lot of unintentional (and avoidable) failures!

If you run cdk bootstrap in a directory where a cdk.json file already exists, then cdk will parse the referenced app (and reports errors and warnings). This adds some unnecessary processing time.

I think a few seconds can be shaved off of the bootstrap process if you perform it before changing directories into the .iac subdirectories. This would also mean that the desired cdk environment is specified to the bootstrap command (e.g. cdk bootstrap aws://123412341234/eu-west-1). Could this change be added?

arditti commented 4 months ago

Nice catch @awsjim - agree with the approche to minimize bootstrap times.

Made the relevant changes cross all providers

awsjim commented 4 months ago

Thanks so much for the contribution @arditti 👏 This is a great addition for users. Apologies for the delay. Merging to include in the next release.