sparse-intern-71089
08/20/2020, 5:20 PMlittle-cartoon-10569
08/20/2020, 9:02 PMlittle-cartoon-10569
08/20/2020, 9:03 PMsalmon-ghost-86211
08/21/2020, 1:00 AMlittle-cartoon-10569
08/21/2020, 1:16 AMancient-megabyte-79588
08/21/2020, 4:44 AMexports
object and they get exported when you are in the main pulumi index.ts. I couldn't get that approach to work in the modules, which are basically only an exported function.
So now, my module functions all return a {}:any
and they are all collected and then added to the exports
object in the top-level index.ts.
var toOutputs : any = {};
var newOutputs = module.Function();
toOutputs = {...toOutputs, ...newOutputs}
<repeat as needed>
Object.keys(toOutputs).forEach( key => { exports[key] = toOutputs[key]});
little-cartoon-10569
08/21/2020, 4:59 AMancient-megabyte-79588
08/21/2020, 6:20 AMexports
object into my module functions. 😄