SST is not removing Cognito user pools on “sst rem...
# sst
r
SST is not removing Cognito user pools on “sst remove” if there are users in the pool, is this expected behaviour?
s
I've noticed the same behavior
f
Ah yeah, that’s the default behaviour for resources with data store (ie. Table, Bucket)
I’m going to add an option to
sst.Auth
so you can configure the User Pool however you want
@Roger Rajaratnam @Seth Geoghegan You can now configure
removalPolicy
and any other User Pool properties in v0.12.0 like this:
Copy code
new Auth(this, "Auth", {
  cognito: {
    userPool: {
      removalPolicy: cdk.RemovalPolicy.DESTROY,
    },
  },
});
There is a small breaking change to the Auth construct. You can read about how to upgrade here - https://docs.serverless-stack.com/constructs/Auth#upgrading-to-v0120