is there a way to send custom arguments to the pul...
# general
g
is there a way to send custom arguments to the puluim binary eg/`pulumi preview -- foo=bar`
c
I don’t believe there is a way to do that, but perhaps it’s worth adding. What is the scenario you are trying to enable? Note that it’s strongly recommended you use Pulumi’s support for configuration, because that gets persisted with the stack and its history. (Possibly encrypted, if you pass
--secret
.) Any place where you rely on environment variables, or perhaps custom command-line arguments, it is a way for you to create non-reproducible builds. Which might be problematic if you ever need to do a rollback.
m
My team needs this functionality, too. We currently build generic automation that can be customized by the user via the cli. Terraform allows this, as does Ansible. So, the cli vars would be the highest precedence, overridding any stack vars.
Copy code
$ pulumi up --vars "foo=bar, zim=zam"
Note, that any custom vars should constitute a unique “stack”, in pulumi’s terms. That way the underlying stack remains unmodified.