aws-cloudformation / cloudformation-resource-schema

The CloudFormation Resource Schema defines the shape and semantic for resources provisioned by CloudFormation. It is used by provider developers using the CloudFormation RPDK.
Apache License 2.0
93 stars 38 forks source link

Schematize nuanced immutability (conditional resource replacement, downtime, etc.) #30

Open rjlohan opened 4 years ago

rjlohan commented 4 years ago

Currently, the CloudFormation resource specification and the documentation do not distinguish the difference between an update operation which fully replaces a resource (including data loss) from those updates which cause some other kind of downtime (e.g a server or database reboot).

The documentation maps both of these concepts to 'Update requires: some interruption' and the resource spec maps only the fully immutable replacement operation, as does the schema currently.

We could include a schema property to signal that a property may cause downtime without data loss as a distinguishing concept.

PatMyron commented 4 years ago

@rjlohan trying to assemble a list of likely stateful resource types here to help prevent data loss: https://github.com/aws-cloudformation/cfn-python-lint/blob/f476b226753a6df494091f392d78990ef93517ef/src/cfnlint/rules/resources/UpdateReplacePolicyDeletionPolicyOnStatefulResourceTypes.py#L22-L44

PatMyron commented 3 years ago

In addition to this problem with createOnlyProperties being more nuanced than being expressable in just a boolean, the same problem applies to readOnlyProperties and writeOnlyProperties as well https://twitter.com/InesParnisari/status/1327040431138299904