Remove SST retain setting for production#610
Conversation
Allows sst remove to fully clean up all resources including Cloudflare DNS records, enabling clean redeploys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| name: 'relay-web', | ||
| home: 'aws', | ||
| removal: input?.stage === 'production' ? 'retain' : 'remove', | ||
| removal: 'remove', |
There was a problem hiding this comment.
🔴 Production resources (DynamoDB Waitlist table) will be deleted on stack removal instead of retained
The old code used input?.stage === 'production' ? 'retain' : 'remove' to protect production resources from deletion when the SST stack is removed or redeployed destructively. The new code hardcodes removal: 'remove' for all stages, including production. This means if the production stack is ever torn down (e.g., via sst remove, a failed deploy, or accidental removal), the DynamoDB Waitlist table and all its data will be permanently deleted instead of being retained. The domain/DNS and Nextjs resources would also be removed. This is a data-loss risk for production.
| removal: 'remove', | |
| removal: input?.stage === 'production' ? 'retain' : 'remove', |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
removalfrom'retain'(production) to'remove'for all stagessst removeto fully clean up Cloudflare DNS records and AWS resourcesTest plan
sst remove --stage production, verify all resources deletedsst deploy --stage productionfor clean redeploy🤖 Generated with Claude Code