Is it possible to add an output to the stack witho...
# getting-started
Is it possible to add an output to the stack without exporting it from the entrypoint module? I was hoping to be able to register a new output to the stack from within code, but so far my attempts have failed.
You shouldn't have any problems doing that. I mainly use Python and almost none of my stack entrypoint modules have exports in them, only sub-modules.
In my case I'm using TS. I was expecting to be able to do something along the lines of:
Copy code
function someFunction() {
  const stack = pulumi.runtime.getStackResource()
But the only way I've found to add top-level outputs to the stack so far is to export a module at the top level and then rely on inheritance, meaning my outputs aren't taking the form I want
Are you using the automation api?
No, not in this case