This message was deleted.
# golang
s
This message was deleted.
l
Sorry you're hitting this rough edge. I believe this is the same issue as https://github.com/pulumi/pulumi-azure/issues/470 It was fixed by https://github.com/pulumi/pulumi/pull/4010 and will be shipped with our next CLI release on wednesday.
g
aha! that might be it 🤔 that’ll teach me to actually read other issues too, sorry 😳
so I’ll wait till Wednesday 😄 , thanks for the super quick response @lemon-agent-27707
l
@green-morning-1318 you should be able to work around this. You can provide something like
&ec2.GetInstanceArgs{}
instead of
nil
for that fourth parameter
🙌 1
g
that does work! thank you
@lemon-agent-27707 is there a way to convert the Pulumi types (like StringOutput or MapOutput) to their respective Go types? For example, I want to check the tags of resources to make sure that a certain tag is set and if it isn’t set perform an action.
l
@green-morning-1318 as these values are essentially futures/promises, you need to use
pulumi.Apply
to execute a callback on the raw values. Some docs on this here: https://www.pulumi.com/docs/intro/concepts/programming-model/#apply A common pattern we use if unit testing functionality is to pass the raw values back into channels. There's an example of that here: https://github.com/pulumi/pulumi/blob/master/sdk/go/pulumi/types_test.go#L320-L349 Does that help? Let me know if you have more questions.
g
Thanks! I’ll go try it out tonight 🙂
@lemon-agent-27707, forgot to update you sorry 😬 the
Apply
was exactly what I was looking for. Thanks for the help 🙌
👍 1