Skip to content

Commit

Permalink
Revert "try fixing migrate import diff in cdktoolkit"
Browse files Browse the repository at this point in the history
This reverts commit bcb544c.
  • Loading branch information
sumupitchayan committed Feb 28, 2024
1 parent 7b678ca commit bb73010
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions packages/aws-cdk/lib/cdk-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { Concurrency, WorkGraph } from './util/work-graph';
import { WorkGraphBuilder } from './util/work-graph-builder';
import { AssetBuildNode, AssetPublishNode, StackNode } from './util/work-graph-types';
import { environmentsFromDescriptors, globEnvironmentsFromStacks, looksLikeGlob } from '../lib/api/cxapp/environments';
import { CloudFormation } from 'aws-sdk';

export interface CdkToolkitProps {

Expand Down Expand Up @@ -168,12 +167,7 @@ export class CdkToolkit {
removeNonImportResources(stack);
}

let resourcesToImportLogicalIds = new Set<string>();
resourcesToImport?.forEach((value: CloudFormation.ResourceToImport, _index: number, _array: CloudFormation.ResourceToImport[]) => {
resourcesToImportLogicalIds.add(value.LogicalResourceId);
});

let changeSet = options.changeSet ? await createDiffChangeSet({
const changeSet = options.changeSet ? await createDiffChangeSet({
stack,
uuid: uuid.v4(),
deployments: this.props.deployments,
Expand All @@ -184,12 +178,6 @@ export class CdkToolkit {
stream,
}) : undefined;

changeSet?.Changes?.forEach((value: CloudFormation.Change, _index: number, _array: CloudFormation.Change[]) => {
if (resourcesToImportLogicalIds.has(value.ResourceChange?.LogicalResourceId!)) {
value.ResourceChange!.Action = 'Import';
}
});

if (resourcesToImport) {
stream.write('Parameters and rules created during migration do not affect resource configuration.\n');
}
Expand Down

0 comments on commit bb73010

Please sign in to comment.