aws / aws/aws-cdk-cli

feat(cli): Warnings about instance replacement and option to prevent deployment if instance replacement occurs

Open
#900 3 comments 15 reactions 0 assignees View on GitHub
effort/medium feature-request p1
Dominant language
TypeScript
Stars
105
Forks
122
Avg merge
1d 17h
Merged PRs (30d)
71

Description

### Discussed in https://github.com/aws/aws-cdk/discussions/16057

Originally posted by **michaelbrewer** August 14, 2021
# The Idea?

Warn users when there will be an instance replacement on deployment, and potentially an option to block an deployment when this could happen.

Even in the CFN spec json, there is an indication of the `UpdateType` being mutable (update with some interruption or none) vs immutable, being a full instance replacement.

```json5
"Type": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-documentationpart-location.html#cfn-apigateway-documentationpart-location-type",
"PrimitiveType": "String",
"Required": false,
"UpdateType": "Immutable"
}
```

- Docs on [Update behavior](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html)

Some features to help users with potentially unexpected CloudFormation nuances:
- Toggleable option to block deployment if resource occurs
- Warn user on synth/diff when their changes will trigger a resource replacement

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.