-
Notifications
You must be signed in to change notification settings - Fork 4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
CDK Bootstrap should not try to process cdk.json #8075
Comments
@asnaseer-resilient hey, this is intended behaviour. The I'm dropping the bug label and marking this as guidance. Let me know if you have any other questions! |
I understand your reasoning but it still doesn't /feel/ right to me. The less surprising thing would be for bootstrap to be completely independent of any app-specific settings. In my case I have had to put in a workaround where I deleted the |
what's the ideal workflow you would be looking for? we wouldn't be able to drop the current behaviour as there are users that rely on it and it's something that would be breaking backwards compatibility. Is it desirable to have a flag maybe to opt out of inferring the environment? Aside: out of curiosity, why not use the default settings that new cdk projects ship with. that should just work i.e.
|
A flag to opt out of this behaviour would indeed be useful. We do not use the structure generated by the CLI as it doesn't quite fit in with our way of working. I will try and write up a short summary of how we are using the CDK and add it in a comment here later this evening. |
This is how we would have liked to have our project files as:
Relevent snippet from
Contents of
Initial contents of
The The The Our deployment is performed using CircleCI which calls various scripts within our The scripts synth-stack, undeploy-stack, diff-stack, and list-stacks are only run locally as and when needed. The issue we had was that the bootstrap-cdk script was failing because it was trying to process the We were therefore forced to delete the
All of our applications follow the above logic. We felt it was safe for all the applications to call bootstrap-cdk as we assumed this is an idempotent operation. |
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
This seems like a demoware-level feature rather than something to take seriously. If you're going to include such 'magic', please give a way to disable it. |
I managed to disable the automagic inferring of environments (and synthesizing) by specifying an empty app, like this:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I noticed that running
cdk bootstrap
causes it to process thecdk.json
file (if one is present). I believe this is a bug as the bootstrap process should have no reason to look at any specific app configuration.Reproduction Steps
We use Typescript and we compile this only when deploying our stack (i.e. when running
cdk deploy
). This means the transpiled Typescript files are not present when runningcdk bootstrap
as follows:cdk bootstrap aws://************/eu-west-2
Error Log
Environment
Snippet of relevant packages in
package.json
:For reference, this is the contents of the
cdk.json
file:This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: