terraform-provider-vultr
terraform-provider-vultr copied to clipboard
[BUG] - Issues attaching reserved IP to a different server
Describe the bug I've got a reserved IP:
resource "vultr_reserved_ip" "ip" {
label = "site-ip"
region_id = data.vultr_region.region.id
ip_type = "v4"
lifecycle {
prevent_destroy = true
}
}
And a server
resource "vultr_server" "vm" {
...
reserved_ip = vultr_reserved_ip.ip.subnet
}
Occasionally, when a server is destroyed and replaced with another one, I get this error:
Error: error creating server: Server add failed: Floating IPv4 address is already attached to another server
This typically goes away on the second terraform apply.
To Reproduce Steps to reproduce the behavior: see above
Expected behavior No errors.
@chmln That is strange behavior....we will look into this
The issue here is the API is still processing the detach of the reserved_ip while TF is already in the process of trying to attach it to a new instance.
This is why when you run terraform apply it will run without any problems. We'll look into addressing this in the API itself
I'm experimenting with an instance that has a floating IP and consistently running into this. Seems like it's been a while - is it still being addressed?