Closed joshsten closed 4 years ago
If I understand correctly, from your screenshot, $env:pullRequestShortName
contains the name of yet another variable that actually has the value of the stack, correct?
That's correct!
If I understand correctly, from your screenshot,
$env:pullRequestShortName
contains the name of yet another variable that actually has the value of the stack, correct?
I just did a quick test and the following worked for me. I defined an outer variable with the value of $(inner)
, which holds the actual value I need:
However, when my outer variable's value itself is not an expression, it doesn't work. For example, this doesn't work for me:
Maybe the value of $env:pullRequestShortName
in your case needs to be something $(anotherVar)
and then your stackName
input for the Pulumi task would just be: $(env:pullRequestShortName)
? Can you please try that and see if that works? Also I am not sure if variable expansion would work with dynamically set variables; I haven't tried it myself and don't know if it does?
That worked! I actually didn't need the env:
Sorry about taking your time. It appears it was my misusage. Thank you for the quick response.
Glad you were able to resolve it!
I would expect this to pass the value of the variable down to the pulumi command as other fields other do, but for some reason in this case it passes the variable as is literally.
This is the yaml screenshot above, but the UI based tasks have the same result.