Am I getting dump or is <https://www.pulumi.com/re...
# golang
m
Am I getting dump or is https://www.pulumi.com/registry/packages/hcloud/api-docs/primaryip/#example-usage not up to date anymore? When I want to assign the ip address to a server like in this example I get this:
Copy code
[00] pkg/stack/program.go:85:19: cannot use ipv4.ID() (value of type pulumi.IDOutput) as pulumi.IntPtrInput value in struct literal: pulumi.IDOutput does not implement pulumi.IntPtrInput (missing method ToIntPtrOutput)
[00] pkg/stack/program.go:87:19: cannot use ipv6.ID() (value of type pulumi.IDOutput) as pulumi.IntPtrInput value in struct literal: pulumi.IDOutput does not implement pulumi.IntPtrInput (missing method ToIntPtrOutput)
c
sometimes the docs are slightly off. check out this https://www.pulumi.com/registry/packages/hcloud/api-docs/server/ and see if you can figure out what should be done. If that doesn't get you anywhere, the way I find out is by looking through pulumi source files.
m
Found a way that works:
ipv4.ID().ApplyT(strconv.Atoi).(pulumi.IntOutput)