This message was deleted.
# general
s
This message was deleted.
l
That's a picture of text. Can you include a link to the GitHub, and/or include more text (not a picture)? Can't tell from just this, as there's no context.
s
well, it's a ComponentResource constructor, I guess there is just one for .net and you'll know better where to find it
anyway, what I'm trying to achieve is to reference component resource from one stack to another, any hints how to do it?
l
There's two ways to interpret that. • If you want the class to be available, use the normal language feature that enables importing a class. • To export an instance, then normal Pulumi stack references are the way to go. However, exporting an object isn't generally a good idea, since you'd have to write your own marshalling logic in your component resource class. Generally it's better to export primitives. And since other resource constructors only ever take those primitives as parameters, that works out ok.
I looked up the docs for remote and there's no helpful explanation for it. Maybe you could ask about that in #CQ2QFLNFL?
s
well, that's what I thought
However, exporting an object isn't generally a good idea, since you'd have to write your own marshalling logic in your component resource class.
any example in pulumi docs how this can be done?
l
No, this would be dependent on your language and the libraries available to you. You could use JSON.parse / JSON.stringify, you could use a YAML parser library, or you could just a pile of primitive values and pass them all in to a constructor in your resource class.
👀 1