https://pulumi.com logo
#general
Title
# general
b

big-potato-91793

04/01/2019, 1:29 PM
Another question, I know in
helm
we can ovveride a variable value in the command line. It’s their a way to do this in pulumi. I got a stack by branch… i want the version of the main app to be the SHA version… in helm we are doing something like
--set-string image.tag ${SHA}
.. what is the best way to do something like this in pulumi?
b

better-rainbow-14549

04/01/2019, 3:45 PM
you can pass in a transformation function
b

big-potato-91793

04/02/2019, 1:18 AM
@better-rainbow-14549 what do you mean
m

millions-judge-24978

04/04/2019, 2:49 PM
@big-potato-91793 Just use the
values
parameter to
ChartOpts
https://pulumi.io/reference/pkg/nodejs/@pulumi/kubernetes/helm/v2/#ChartOpts i.e.
Copy code
...
values : {
  image: { tag: '1.0.0' }
}
...
b

big-potato-91793

04/04/2019, 2:52 PM
i will not used a chart….
m

millions-judge-24978

04/04/2019, 2:53 PM
I see, mis read your question. Most straight forward way I can think of would be an environment variable.
IMAGE_TAG=1.0.0 pulumi up
Then interpolate based on that environment variable in code