Is your feature request related to a problem? Please describe.
I am unable to easily get a specific address from the tailscale_device data source as all addresses are returned in a list(string).
I need to specifically get the IPv4 address. At the moment I have a workaround although it's clunky.
I'm using OpenTofu so I'm doing (regex would work too of course):
[for ip in data.tailscale_device.foo.addresses : ip if can(cidrcontains(local.tailscale_cidr, ip))][0]
Describe the solution you'd like
I would like to see separate attributes for IPv4 and IPv6 such as ipv4_address and ipv6_address would be nice. The short and long hostnames are already available on the data source.
Is your feature request related to a problem? Please describe.
I am unable to easily get a specific address from the
tailscale_devicedata source as all addresses are returned in alist(string).I need to specifically get the IPv4 address. At the moment I have a workaround although it's clunky.
I'm using OpenTofu so I'm doing (regex would work too of course):
Describe the solution you'd like
I would like to see separate attributes for IPv4 and IPv6 such as
ipv4_addressandipv6_addresswould be nice. The short and long hostnames are already available on the data source.