Skip to content

Commit

Permalink
fix(migrate): --from-stack does not retrieved processed template (#…
Browse files Browse the repository at this point in the history
…29035)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
TheRealAmazonKendra committed Feb 8, 2024
1 parent 798ea05 commit 74c4c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/commands/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function readFromPath(inputPath: string): string {
export async function readFromStack(stackName: string, sdkProvider: SdkProvider, environment: Environment): Promise<string | undefined> {
const cloudFormation = (await sdkProvider.forEnvironment(environment, Mode.ForReading)).sdk.cloudFormation();

const stack = await CloudFormationStack.lookup(cloudFormation, stackName);
const stack = await CloudFormationStack.lookup(cloudFormation, stackName, true);
if (stack.stackStatus.isDeploySuccess || stack.stackStatus.isRollbackSuccess) {
return JSON.stringify(await stack.template());
} else {
Expand Down

0 comments on commit 74c4c6f

Please sign in to comment.