blue-actor-6315
11/15/2023, 7:05 PMindex.ts
.
Usually the way to set outputs is to export
it from the main index.ts
but i found myself wanting to export values from other files and pulumi does not seem to have an answer to that.
Here's what you can do:
function setOutput(key: string, value: any) {
require(process.env.PWD + '/index')[key] = value;
}
you can call this function from anywhere to set stack outputs, i hope this helps someone