per the example on the [linode.DomainRecord ](<htt...
# golang
b
per the example on the [linode.DomainRecord ](https://www.pulumi.com/registry/packages/linode/api-docs/domainrecord/) page, the
*linode.Domain
returned by the
linode.NewDomain
constructor should have a method, ID, which returns an integer of the provider ID for the resource:
Copy code
dns/linode.go:46:16: cannot use _domain.ID() (value of struct type pulumi.IDOutput) as pulumi.IntInput value in struct literal: pulumi.IDOutput does not implement pulumi.IntInput (missing method ToIntOutput
as a workaround, i added some code that uses `Apply[T]`:
Copy code
domainID := _domain.ID().ApplyT(func(id pulumi.ID) (int, error) {
			i, err := strconv.Atoi(string(id))
			if err != nil {
				return 0, err
			}
			return i, nil
		}).(pulumi.IntOutput)
is there a betterer way of doing this?
e
I think thats the best you can do for now. The engine and protocol assumes all IDs are strings, which does clash with a few resources.
🙏 1
l
@bitter-chef-15418 Sorry just now seeing this. I just wanted to second @echoing-dinner-19531 that what you have there, is the best way to go about it for now. I'm doing exactly that here and here. I work for Akamai (formerly Linode), so this provider/package is my livelihood, lol. Feel free to @ me if you have other questions like this, because I've probably been through it before. 🤗
🙏 1