wow I figured out how to deal with those "cannot r...
# sst
t
wow I figured out how to deal with those "cannot remove export issues". You can manually deploy stacks in a different order so that the one you updated gets updated first
sst deploy <stack>
So if you have Stack1 and Stack2. If you stop referencing something in Stack1 from Stack2, cdk will fail because it tries to cleanup the export in Stack1 first while the old Stack2 is still referencing it. Instead you can do
sst deploy stack2
and then do a normal deploy and it should go in the right order
a
nice! let’s add a tips page and mention this there.
I find this behavior really annoying. I plan to move my stateful stacks (es, rds, vpc) from sst and lookup in API infra using SSM parameters.
Solution proposed by www.endoflineblog.com is to use exportValue function. This however lead to circular reference in my stack…