many-country-10208
01/20/2025, 9:58 AMpulumiProgram
? The TypeScript type is type PulumiFn = () => Promise<Record<string, any> | void>
, so no function args are allowed without breaking the type. It would work when reading data inside the pulumiProgram from an outer global variable (which has been set from a different part of the code before), but that feels wrong and unsafe. I'm quite certain that I'm not the only one who wants to have some parts of the Pulumi script dynamic, so I'm curious to hear your thoughts! 🙂
Reference: https://www.pulumi.com/docs/iac/using-pulumi/automation-api/getting-started-automation-api/#define-your-pulumi-programmodern-zebra-45309
01/20/2025, 1:37 PMMyStackParameters
) and had a method to add an instantiated data model to the stack's configuration (mapping each field in the data model to a configuration key while taking care of nested fields and type conversions).
In the specific instance, we used the same data model to parse config files and API requests, and it really helped to keep everything in sync across different stacks and programs.kind-motherboard-59197
01/21/2025, 7:53 AMkind-motherboard-59197
01/21/2025, 7:53 AMkind-motherboard-59197
01/21/2025, 7:58 AMmany-country-10208
01/23/2025, 1:07 PM