You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A resource is a raw CloudFormation item.
A construct is CDK's L1 or L2 abstraction of a resource.
A stateful resource can be defined as something that holds state.
This could be a database, a bucket, load balancer, message queue etc.
This change will, upon stack synthesis, walk the tree of resources
and log a warning for all the stateful resources we have identified.
This does mean we end up keeping a list of these resources,
which is not ideal...
The `GuStatefulMigratableConstruct` mixin performs a similar role here,
however that only operates against the constructs that exist in the library.
Ideally we'd be able to use Stack Policies to protect these resources.
However they are not currently supported in CDK.
See:
- https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html#protected-prepare
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html
- aws/aws-cdk-rfcs#72
`The resource '${cfnBucketResourcePath}' of type AWS::S3::Bucket is considered stateful by @guardian/cdk. Care should be taken when updating this resource to avoid accidental replacement as this could lead to downtime.`
`The resource '${construct.node.path}' of type ${construct.cfnResourceType} is considered stateful by @guardian/cdk. Care should be taken when updating this resource to avoid accidental replacement as this could lead to downtime.`
0 commit comments