Hey all, I have a project built with Pulumi Automa...
# automation-api
b
Hey all, I have a project built with Pulumi Automation API. I want to do a very simple thing - passing variables to the pulumi function itself. In the example here - https://github.com/pulumi/automation-api-examples/blob/main/nodejs/pulumiOverHttp-ts/index.ts#L16 You can see that
createPulumiProgram
gets
content: string
as a parameter, and then, in line 72 you call this pulumi program with the
content
variable. Unfortunately when I try to to this, the following error is shown (in the screenshot). Any idea what’s the right way to do so ?
c
I don't know if that's the only solution, but for CNAPPgoat what we do is propogate arguments through the context parameter as config values, works like a charm
so inside the Pulumi program you'd have something like
Copy code
ctx.GetConfig("aws:region")
and in the wrapper calling it
Copy code
if err := s.SetConfig(ctx, "aws:region", auto.ConfigValue{Value: options.AWSRegion}); err != nil {
b
I’ll try this, thanks @clean-zoo-67541