Skip to content

Commit

Permalink
fix(cli): unable to upgrade new style bootstrap to version 4
Browse files Browse the repository at this point in the history
We were reading the wrong key when reading version source for template
resources. This prevented upgrade of bootstrap as the new version was
being returned as `0` instead of `4`.

Fixes #10016
  • Loading branch information
shivlaks committed Aug 28, 2020
1 parent ad7465d commit 9dde324
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as fs from 'fs-extra';
import { Mode, SdkProvider } from '../aws-auth';
import { deployStack, DeployStackResult } from '../deploy-stack';
import { DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo } from '../toolkit-info';
import { BOOTSTRAP_VERSION_OUTPUT, BootstrapEnvironmentOptions } from './bootstrap-props';
import { BOOTSTRAP_VERSION_OUTPUT, BootstrapEnvironmentOptions, BOOTSTRAP_VERSION_RESOURCE } from './bootstrap-props';

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

for (const vs of versionSources) {
Expand Down

0 comments on commit 9dde324

Please sign in to comment.