Skip to content

(cli): change-set diff not required for new stack diffs #29265

@mrgrain

Description

@mrgrain

Describe the bug

The change-set diff approach for new stacks is unnecessary. The whole point of change-set based diff was to fix incorrect resource replacements, however for a new stack we don't have resource replacements.

Further more, the clean-up code for change-set based diff on new stacks includes a delete-stack call. This is required to not leave behind an empty ghost stack. But it is quite spooky to see this code and a lot of delete-stack calls in CloudTrail.

Expected Behavior

Diff for new stacks does use the previous local diff implemenation.
CDK does not make any delete-stack calls when executing cdk diff.

Current Behavior

n/a

Reproduction Steps

  • create a new stack
  • run cdk diff
  • check CloudTrail

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.130.0

Framework Version

No response

Node.js Version

any

OS

any

Language

TypeScript, Python, .NET, Java, Go

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliIssues related to the CDK CLIeffort/mediumMedium work item – several days of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions