If I am using GCP and have a resource that has a s...
# general
a
If I am using GCP and have a resource that has a specific known tag, is there any way for me to look it up by that tag with Pulumi?
b
you can use a getter function, it’ll depend on if the getter function supports retrieving by tag. which is the resource?
a
I have a GCP Task
Queue
I would like to look up, but I don't have its name.
I'd like to figure out a way to make it discoverable.
(without coupling two different stacks together)
b
there isn’t a data source with that unfortunately, certainly not with the tag as an argument 😞
you may need to use a stack reference
a
Ergh, messy
Are there any examples of stack references for C# based deployments?
s
This page doesn't have C# examples, but the TS to C# translation should be pretty straightforward: https://www.pulumi.com/learn/building-with-pulumi/stack-references/
The main thing to know is that it's
Pulumi.StackReference
and that the identifier for your
Queue
has to be an output of the stack you're referencing.