https://pulumi.com logo
#typescript
Title
# typescript
s

some-continent-7311

05/31/2023, 6:17 AM
Hello all. Am trying to dynamically change the outputs depending on the selected stack. I thought something like this would work:
Copy code
const outputs = new Map<string, pulumi.Output<string>>();

...
if (stack === "development") {
  outputs.set("key", "value");
}

...
return outputs;
but Pulumi does not seem to recognize
Map
as a valid stack outputs type. What could be a workaround?
One workaround I found is to use
any
when declaring
outputs
. But is there a better option?