sst / ion

❍ — a new engine for SST

Home Page:https://ion.sst.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose stack outputs to sst shell

chrisandrewcl opened this issue · comments

Currently, it seems only linked resources are injected in the env when running sst shell but stack outputs are also very useful in this context.

Is there any supported way to access them when running scripts?

* I am currently working around it by using a dummy linkable component that exports the stack outputs in its link properties, but it would be nice to have it baked in ion.

commented

So any resource gets adding to the shell. It doesn't need to be linked but we have a feature coming soon that'll let you create a resource out of any output and that'll be exposed in the sst shell as well.

The upcoming feature you mentioned sounds like it will do the trick!

* Also, what I meant to say was "only linkable resources are currenlty added to the env" 🤦

commented

this is released but not documented yet - you can do

new sst.Resource("MyResource", { any: "thing", foo: other.thing } )

and it will show up in sst shell

commented

it's linkable too