-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-region support stacks need bootstrappin' #8082
Comments
…-region support Stacks Fixes aws#8082
…-region support Stacks Fixes aws#8082
I'm not able to cdk diff against an app in a cross-region scenario because you now expect deploy-role to be assumable. A glance at the source code confirms that you only use 2 (deploy, cfexec) of the 3 (lookup, deploy, cfexec) roles usually involved.
This is more confusing than a better documentation would have been. I would not mind cdk bootstrapping the additional environment as long as I can figure out why it's needed from the docs. And better logging in the event that bootstrapping is missing would help too. But there is no dancing around the fact that you need to deploy something somewhere using deploy-role, but at the same time are now diverging from the standard of using lookup-role to check that this 'something' is present (or not). Now with your 'fix', I can not cdk diff even If I have cdk bootstrapped in that support stack account/region, because my credentials only allow assuming the lookup-role (and NOTHING ELSE). Only the CI/CD pipeline can assume the deploy-role in my project. So, in short, how do I |
When deploying cross-account, cross-region from the meerkat pipeline, there are obviously 2 envs that need to be bootstrapped:
This all makes perfect sense for the customer and is easily explained.
There is also a 3rd env involved, where we deploy the support stack with the replication bucket. When we SelfUpdate, the pipeline tries to deploy the support stack, so it needs to assume the deployment role there, which requires it to be bootstrapped.
We would like to get rid of the
(Boostrap)
requirement for the support stack.Stacks have a "Synthesizer" these days, which controls the roles/asset bucket/etc used to deploy it. We need a new Synthesizer which will use the role of the parent stack, and won't support assets... and then that synthesizer needs to go onto that support stack in some way. Maybe automatically, maybe configurable? I'd hope for automatic unless given otherwise.
This file contains the default synthesizer which it now gets (because it's a
Stack
, and all Stacks get this synthesizer in the New World Of CI/CD):https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts
The synthesizer can be overridden upon creation, so the support stack must be created with a
SupportStackSynthesizer
which is in some way sensitive to the parent stack being aDefaultSynthesizer
-- obviously this should all not fall over with legacy stacks, only be slightly more optimized when the rest of the stacks are using the "new" synthesis methods.The text was updated successfully, but these errors were encountered: