Open AAverin opened 11 months ago
Currently DigitalOcean reserved IPs do not have a "name." The only unique identifier for the reserved IP is the IP address itself. In order to retrieve information about the reserved IP from the DigitalOcean, you must supply the IP.
https://docs.digitalocean.com/reference/api/api-reference/#operation/reservedIPs_get
@andrewsomething Why would I need to get a reserved IP if I already know it? What's the point of it?
Is your feature request related to a problem? Please describe.
If reserved_ip resource is managed by terraform it ends up in the state. Then destroying such infrastructure results in destruction of the reserved ip too. I would like to keep my reserved ip in case I want to tear down and recreate the whole setup, but still have it accessible on the same production ip. A way to do that could be to remove resource from terraform state and have data instead.
Issue is that
ip_address
field is required ondata.digitalocean_reserved_ip
and it is not possible to just get already created reserved_ip by name to then assign it to the droplet.Describe the solution you'd like
ip_address
field should be marked as optional anddata.digitalocean_reserved_ip
should provide access to created reserved ip by name without ip_address, basically allowing to get unassigned reserved_ip.Describe alternatives you've considered
Additional context