Skip to content

Commit c5bb55c

Browse files
authored
fix(cli): unable to upgrade new style bootstrap to version (#10030)
We were reading the wrong key when reading version source for template resources. This prevented upgrade of bootstrap as the new version was being incorrectly returned as `0`. Fixes #10016 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent ad7465d commit c5bb55c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as fs from 'fs-extra';
66
import { Mode, SdkProvider } from '../aws-auth';
77
import { deployStack, DeployStackResult } from '../deploy-stack';
88
import { DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo } from '../toolkit-info';
9-
import { BOOTSTRAP_VERSION_OUTPUT, BootstrapEnvironmentOptions } from './bootstrap-props';
9+
import { BOOTSTRAP_VERSION_OUTPUT, BootstrapEnvironmentOptions, BOOTSTRAP_VERSION_RESOURCE } from './bootstrap-props';
1010

1111
/**
1212
* Perform the actual deployment of a bootstrap stack, given a template and some parameters
@@ -61,7 +61,7 @@ export async function deployBootstrapStack(
6161
function bootstrapVersionFromTemplate(template: any): number {
6262
const versionSources = [
6363
template.Outputs?.[BOOTSTRAP_VERSION_OUTPUT]?.Value,
64-
template.Resources?.[BOOTSTRAP_VERSION_OUTPUT]?.Properties?.Value,
64+
template.Resources?.[BOOTSTRAP_VERSION_RESOURCE]?.Properties?.Value,
6565
];
6666

6767
for (const vs of versionSources) {

0 commit comments

Comments
 (0)