Skip to content

Commit 0b388bd

Browse files
authored
fix(outputs): correct issue with nested stack outputs (#1257)
1 parent afea322 commit 0b388bd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/core/runtime/src/store-stack-output-step.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,16 @@ export const handler = async (input: StoreStackOutputInput) => {
4444

4545
const outputs: StackOutput[] = [];
4646
for await (const summary of stacks) {
47-
if (!summary.StackName.match(`${acceleratorPrefix}(.*)-Phase${phaseNumber}`)) {
47+
if (!summary.StackName.match(`${acceleratorPrefix}(.*)-Phase${phaseNumber}`) && !summary.ParentId) {
4848
console.warn(`Skipping stack with name "${summary.StackName}"`);
4949
continue;
5050
}
51+
if (summary.ParentId) {
52+
if (!summary.ParentId.match(`${acceleratorPrefix}(.*)-Phase${phaseNumber}`)) {
53+
console.warn(`Skipping stack with name "${summary.StackName}"`);
54+
continue;
55+
}
56+
}
5157
const stack = await cfn.describeStack(summary.StackName);
5258
if (!stack) {
5359
console.warn(`Could not load stack with name "${summary.StackName}"`);

0 commit comments

Comments
 (0)