sparse-intern-71089
04/09/2023, 5:26 AMsalmon-account-74572
04/10/2023, 2:07 PM.AsIDOutput()
and reference subnetId
directly as an Input to another resource.powerful-lighter-63321
04/11/2023, 6:27 AMsubnetId := 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.salmon-account-74572
04/11/2023, 12:27 PMGetNetworkSubnet
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.)powerful-lighter-63321
04/12/2023, 7:11 AMsalmon-account-74572
04/12/2023, 11:41 AMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by