This message was deleted.
# general
s
This message was deleted.
s
Without seeing your code, you should be able to to omit the
.AsIDOutput()
and reference
subnetId
directly as an Input to another resource.
p
It doesn't work. The method expects an IDInput and the Output can't be used:
Copy code
subnetId := stackRef.GetOutput(pulumi.String(name))

snet, err := hcloud.GetNetworkSubnet(ctx, ctx.Stack(), subnetId, nil)
It's related to the hcloud and I think if it should be as easy as you describe then there might be something wrong with the hcloud parameters. This would explain that even the examples for hcloud won't work without additional work of casting the Outputs in some other Types.
s
I’m not familiar with the HCloud provider, but I could see where the
GetNetworkSubnet
may not work with an Output for the parameter. Given that this is being retrieved via a stack reference, perhaps check out the new
GetOutputDetails
functionality, which is intended to make it easier to work with values retrieved via stack references: https://www.pulumi.com/blog/stack-reference-output-details/ (I haven’t used this functionality with Go yet, but I have done some work with it in TypeScript.)
p
After some tries I got a step further. But: As mentioned in my last post. The one is in Project base, the other is in another Project (not stack). Now It works with the ID as far it gets no issues with getting the ID but the urn isn't found. Which is in another project. What's the master plan? Do I have to have all things together in one Project? WIth diffrent stacks?
s
Can you share more details, perhaps more portions of your code? We’d love to help you find a solution.