You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A problem that sometimes happens today is that an account has a customized bootstrap stack setup, but a developer is not aware and they `cdk bootstrap` the customizations away with the CDK default template.
This change introduces a new parameter, `BootstrapFlavor`, that an organization can change to a different value. The CDK CLI will refuse to overwrite existing bootstrap stacks of one flavor, with a different one.
This string could have been in the template metadata, but making it a parameter puts it front and center, making it more obvious that template customizers should change it.
Does not change the bootstrap stack version itself, since nothing about the resources inside changed.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
logging.warning(`Bootstrap stack already at version '${this.currentToolkitInfo.version}'. Not downgrading it to version '${newVersion}' (use --force if you intend to downgrade)`);
70
-
if(newVersion===0){
71
-
// A downgrade with 0 as target version means we probably have a new-style bootstrap in the account,
72
-
// and an old-style bootstrap as current target, which means the user probably forgot to put this flag in.
73
-
logging.warning('(Did you set the \'@aws-cdk/core:newStyleStackSynthesis\' feature flag in cdk.json?)');
logging.warning(`Bootstrap stack already exists, containing '${currentVariant}'. Not overwriting it with a template containing '${newVariant}' (use --force if you intend to overwrite)`);
79
+
returnabortResponse;
80
+
}
81
+
82
+
// Validate that we're not downgrading the bootstrap stack
logging.warning(`Bootstrap stack already at version ${currentVersion}. Not downgrading it to version ${newVersion} (use --force if you intend to downgrade)`);
87
+
if(newVersion===0){
88
+
// A downgrade with 0 as target version means we probably have a new-style bootstrap in the account,
89
+
// and an old-style bootstrap as current target, which means the user probably forgot to put this flag in.
90
+
logging.warning('(Did you set the \'@aws-cdk/core:newStyleStackSynthesis\' feature flag in cdk.json?)');
0 commit comments