From 6f4cf0fcc43cece53008e582defe92b7bcede4fc Mon Sep 17 00:00:00 2001 From: StNekroman Date: Sun, 22 Sep 2024 16:06:12 +0300 Subject: [PATCH] add getResourceNames() to CfnInclude --- .../aws-cdk-lib/cloudformation-include/lib/cfn-include.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts b/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts index 9a1018e79e026..7c8f40e4d542a 100644 --- a/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts +++ b/packages/aws-cdk-lib/cloudformation-include/lib/cfn-include.ts @@ -203,6 +203,13 @@ export class CfnInclude extends core.CfnElement { return ret; } + /** + * @returns Array of all known logicalIds, associated with each low-level CfnResource from the template. + */ + public getResourceNames() : string[] { + return Object.keys(this.resources); + } + /** * Returns the CfnCondition object from the 'Conditions' * section of the CloudFormation template with the given name.