aws / aws/aws-cdk-cli

(diff): provide an option to detect drift in cdk diff

Open
#1,204 3 comments 3 reactions 0 assignees View on GitHub
@aws-cdk/cloudformation-diff feature-request p2
Dominant language
TypeScript
Stars
105
Forks
122
Avg merge
1d 17h
Merged PRs (30d)
71

Description

### Describe the feature

Adds an option to detect differences between templates and drift differences simultaneously (e.g., --drift-aware).

### Use Case

In CloudFormation, there are two types of differences: diff (difference between the template managed by the Stack and the synthesized template) and drift (difference between the template managed by the Stack and the actual resources).

Currently, CDK requires using two commands, `cdk diff` and `cdk drift`, to check these differences respectively. However, this often leads to oversight, and beginners, in particular, may not even be aware of the existence of drift.

### Proposed Solution

Provide an option to detect drift when detecting differences between templates.

Example API may look like:

```sh
cdk diff --drift-aware
```

However, the `--change-set` option must be enabled.

### Other Information

_No response_

### Acknowledgements

- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.1109.0

### Environment details (OS name and version, etc.)

All

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.