This message was deleted.
# azure
s
This message was deleted.
b
can you share your code? it's probably just needing to add an index in your loop
l
I've included the go code and the yaml file!
b
ah, so you have multiple loops with pulumi.Run(func(ctx *pulumi.Context) error {` The error message is telling you that you have two resources with the same name. Each Pulumi program has a parent resource with the provider/stack in it. and because you have 2x
pulumi.Run
functions they're classing. I would change the code to have
pulumi.Run
and then perform your loops of the yaml inside that, that should fix it
l
@billowy-army-68599 could you show me exactly what you're thinking because I'm getting formatting errors all over the place
@billowy-army-68599 nvm got it! Thank you so much for your help. Guess it was just that point in the day lol
b
ha, glad to help! I was just putting something together, but essentially put the
pulumi.Run
in your
main()
l
Also I've been trying to add depends on statements with GoLang and I haven't been able to get them to work, I'm referencing variables outside of for loops like I usually do but to no avail. Resource group isn't created in time and some virtual networks fail. Oh well.
b
If you can share your code I can try help
l
Heres my refactored code. I'm trying to use depends on via the docss at https://www.pulumi.com/docs/intro/concepts/resources/#dependson but I think I'm now having issues with variable scope.