Skip to content

Remove SST retain setting for production#610

Merged
willwashburn merged 1 commit intomainfrom
feature/remove-retain-setting
Mar 21, 2026
Merged

Remove SST retain setting for production#610
willwashburn merged 1 commit intomainfrom
feature/remove-retain-setting

Conversation

@willwashburn
Copy link
Member

@willwashburn willwashburn commented Mar 21, 2026

Summary

  • Changes removal from 'retain' (production) to 'remove' for all stages
  • Enables sst remove to fully clean up Cloudflare DNS records and AWS resources

Test plan

  • Merge, run sst remove --stage production, verify all resources deleted
  • Run sst deploy --stage production for clean redeploy

🤖 Generated with Claude Code


Open with Devin

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>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

name: 'relay-web',
home: 'aws',
removal: input?.stage === 'production' ? 'retain' : 'remove',
removal: 'remove',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
removal: 'remove',
removal: input?.stage === 'production' ? 'retain' : 'remove',
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@willwashburn willwashburn merged commit b200f68 into main Mar 21, 2026
32 checks passed
@willwashburn willwashburn deleted the feature/remove-retain-setting branch March 21, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant