From 159d3a144aef9f8d626ac97519d4e4786e5992ff Mon Sep 17 00:00:00 2001 From: Edward Foyle Date: Wed, 29 Nov 2023 09:43:06 -0800 Subject: [PATCH] remove unused code --- .../src/find_deployed_resource.ts | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/packages/integration-tests/src/find_deployed_resource.ts b/packages/integration-tests/src/find_deployed_resource.ts index 4e5b31e90a..ee52620b06 100644 --- a/packages/integration-tests/src/find_deployed_resource.ts +++ b/packages/integration-tests/src/find_deployed_resource.ts @@ -59,42 +59,3 @@ export class DeployedResourcesFinder { return resourcePhysicalIds; }; } - -/** - * Returns the physical IDs of the resources of type "resourceType" in the stack defined by "backendId" - * Traverses nested stacks as well - */ -export const findDeployedResources = async ( - cfnClient: CloudFormationClient, - backendId: BackendIdentifier, - resourceType: string -): Promise => { - const stackName = BackendIdentifierConversions.toStackName(backendId); - - const queue = [stackName]; - - const resourcePhysicalIds: string[] = []; - - while (queue.length > 0) { - const currentStack = queue.pop(); - const response = await cfnClient.send( - new DescribeStackResourcesCommand({ StackName: currentStack }) - ); - - for (const resource of response.StackResources || []) { - if ( - resource.ResourceType === 'AWS::CloudFormation::Stack' && - resource.PhysicalResourceId - ) { - queue.unshift(resource.PhysicalResourceId); - } else if ( - resource.ResourceType === resourceType && - resource.PhysicalResourceId - ) { - resourcePhysicalIds.push(resource.PhysicalResourceId); - } - } - } - - return resourcePhysicalIds; -};