From 053deeffaa9f14e3aaa85d2f820112efc0289145 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Tue, 11 Jun 2019 14:10:05 -0700 Subject: [PATCH] fix(aws-cdk): correctly pass Stack-level Tags. Fixes #2822 --- packages/aws-cdk/lib/api/cxapp/stacks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/api/cxapp/stacks.ts b/packages/aws-cdk/lib/api/cxapp/stacks.ts index ce870249115e1..c63a600c4577c 100644 --- a/packages/aws-cdk/lib/api/cxapp/stacks.ts +++ b/packages/aws-cdk/lib/api/cxapp/stacks.ts @@ -6,6 +6,7 @@ import contextproviders = require('../../context-providers'); import { debug, error, print, warning } from '../../logging'; import { Renames } from '../../renames'; import { Configuration } from '../../settings'; +import { flatMap } from '../../util/arrays'; import { SDK } from '../util/sdk'; /** @@ -233,7 +234,7 @@ export class AppStacks { * @returns an array with the tags available in the stack metadata. */ public getTagsFromStackMetadata(stack: cxapi.CloudFormationStackArtifact): Tag[] { - return stack.findMetadataByType(cxapi.STACK_TAGS_METADATA_KEY).map(x => x.data); + return flatMap(stack.findMetadataByType(cxapi.STACK_TAGS_METADATA_KEY), x => x.data); } /**