Hello All, I am trying to use automation API and I...
# general
p
Hello All, I am trying to use automation API and I was wondering: is there a way to pass arguments to the program? We have this function and I was wondering what to do if my
program
expects some arguments from the user?
Copy code
auto.create_or_select_stack(
            stack_name=self.config.environment,
            project_name=self.deployment_name,
            program=self.program,
            opts=self.workspace_opts)
p
Thanks Piers! So there is no way to actually provide them to a method directly? We would like to adapt it for a workflow in which we just pass a path to python file with the function + provide arguments to Pulumi automation api, rather then preconfigure the program before with a wrapper and return it fully configured
b
When you say function, do you mean the function containing the pulumi program? Or function as in lambda/azure function?
p
Function containing pulumi program. Ideally I would like to pass these arguments somewhere in for example
opts
arg
r
The example piers linked to is the correct form. Can you tell me why that form doesn’t meet your needs? You are still able to pass arguments to the Pulumi program.