latitudesh / terraform-provider-latitudesh

Latitude.sh Terraform Provider
https://registry.terraform.io/providers/latitudesh/latitudesh/latest/docs
Mozilla Public License 2.0
10 stars 4 forks source link

Add a way to fetch a server's IPv6 Address #77

Open pojntfx opened 1 month ago

pojntfx commented 1 month ago

Is your feature request related to a problem? Please describe.

The dashboard shows the IPv6 address that has been assigned to the server:

Screenshot of the Latitude.sh dashboard showing the IPv4 and IPv6 address of a server

But in the Terraform provider, there is no way to retrieve it; only the IPv4 address can be fetched: https://github.com/latitudesh/terraform-provider-latitudesh/blob/bea5723ecb3b8f28a7329c354200bc4ff253f580/latitudesh/resource_server.go#L91

This differs from e.g. the Equinix, EC2 and most other cloud OpenTofu/Terraform providers which usually expose both families through a read-only property.

Describe the solution you'd like

Optimally, there we would be a similar field to the one there currently is for IPv4, but for IPv6 (primary_ipv6) - or alternatively, a way to fetch the list of attached IPs (this is what Equinix does, too)

Describe alternatives you've considered

Doing a manual API call, e.g. to https://docs.latitude.sh/reference/get-ips, but this is cumbersome and breaks the Terraform integration

Additional context

Prior work for fetching IPv4 and IPv6 addresses after instance creation: https://github.com/pojntfx/uninstance/blob/main/outputs.tf

esoubihe commented 1 month ago

@pojntfx thanks for your feedback, we will work on this improvement and circle back