sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.33k stars 172 forks source link

Add `sst nuke` command #672

Open garysassano opened 1 month ago

garysassano commented 1 month ago

It would be nice to have something similar to aws-nuke for purging all resources created by SST in an AWS account (the parameters in SSM, the states in S3, etc.)

jschuur commented 1 month ago

There's the 'removal' option in sst.config.ts, which defaults to 'retain' for production:

 removal: input?.stage === 'production' ? 'retain' : 'remove',

It would be handy to be able to override that in the regular sst remove command.

Does 'remove' still leave some resources?

garysassano commented 1 month ago

Does 'remove' still leave some resources?

Yes, sst remove retains some resources in your AWS account which are used internally by SST.

jschuur commented 1 month ago

Does 'remove' still leave some resources?

Yes, sst remove retains some resources in your AWS account which are used internally by SST.

I was referring to explicitly setting removal: 'remove' in sst.config.ts not the sst remove CLI command. The remove command uses this setting to decide how much to remove.

The docs say 'remove: Remove all your resources on remove.', but I haven't validated if 'all' doesn't include internal ones.