Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Log when any stateful resource is in stack #530

Closed
wants to merge 1 commit into from

Commits on May 6, 2021

  1. feat: Log when any stateful resource is in stack

    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
    akash1810 committed May 6, 2021
    Configuration menu
    Copy the full SHA
    572542e View commit details
    Browse the repository at this point in the history