Is there a way to refer output of Stack in seed.ru...
# seed
p
Is there a way to refer output of Stack in seed.run after deploy hooks. For example, i have following code in my Stack file
Copy code
this.addOutputs({
      AFTER_DEPLOY_CMD: `npx datadog-ci lambda instrument -f ${someFunction.name}`,
    });
And use this output in
after_deploy
hook in seed.yaml
Copy code
after_deploy:
  - 'npm install -g @datadog/datadog-ci'
  - ${some_how_get_out_put}
Also is there a way to access stage name in seed.yaml file?
s
Not sure if you're running an SST app, but one option might be the SST Script Construct to post a message to slack once the stack is updated.
f
Thanks @Seth Geoghegan!
@Pavan Kumar or u can use the
aws cli
to query for the stack output
AFTER_DEPLOY_CMD
Copy code
aws cloudformation describe-stacks --stack-name my-stack --query 'Stacks[0].Outputs[?OutputKey==`AFTER_DEPLOY_CMD`].OutputValue | [0]
p
Thanks @Frank. Will try this.
Thanks @Seth Geoghegan