You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In few minutes after creating a droplet, I've tried to plan and apply again.
Somehow the provider tries to move reserved IP to 'default' project, although it was explicetely assigned to another project.
Affected Resource(s)
digitalocean_project
digitalocean_reserved_ip
Expected Behavior
Should be no change in IP assignment.
Actual Behavior
Looks like 'floatingip' appeared in my state although I've never requested it. Second plan/apply tries to replace it with reservedip.
Plan output:
# digitalocean_project.jaysearch-prod will be updated in-place
~ resource "digitalocean_project" "reducted-prod" {
id = "<reducted>"
name = "tf-managed-1"
~ resources = [
- "do:floatingip:161.<reducted>.96",
+ "do:reservedip:161.<reducted>.96",
# (1 unchanged element hidden)
]
# (7 unchanged attributes hidden)
}
Apply error:
digitalocean_project.reducted-prod: Modifying... [id=9227bb8a-c2e5-4d71-98cb-37f31679d3ef]
╷
│ Error: Error assigning resources to default project: Error assigning resources: POST https://api.digitalocean.com/v2/projects/<reducted>/resources: 412 (request "eefac58c-3ff3-4ad7-99eb-d5e674681abf") Cannot move a Reserved IP with an associated Droplet. Move the Droplet instead
│
│ with digitalocean_project.reducted-prod,
│ on digitalocean.tf line 26, in resource "digitalocean_project" "reducted-prod":
│ 26: resource "digitalocean_project" "reducted-prod" {
│
Steps to Reproduce
Terraform Configuration Files
resource "digitalocean_project" "reducted-prod" {
name = "tf-managed-1"
description = ""
purpose = "Infra for reducted"
resources = [
digitalocean_droplet.reducted1.urn,
digitalocean_reserved_ip.reducted-ip.urn
]
}
# ...
resource "digitalocean_reserved_ip" "reducted-ip" {
droplet_id = digitalocean_droplet.reducted1.id
region = digitalocean_droplet.reducted1.region
}
output "jaysearch1-reserved-ip" {
# this address should be used for A record in DNS
value = digitalocean_reserved_ip.reducted-ip.ip_address
}
# ...
Debug Output
Will send via DigitalOcean support ticket
The text was updated successfully, but these errors were encountered:
Thanks for raising this issue. It is a duplicate of #1031. This is a problem with the DigitalOcean projects API following the rename of floating IPs to reserved IPs. If you assign a reserved IP, the API response returns the URN in floating IP format.
As a work around, you can use the floating IP format in the project assignment:
Somehow the provider tries to move reserved IP to 'default' project, although it was explicetely assigned to another project.
When assigned to a Droplet, reserved IPs always belong to the same project as the Droplet. This happens at the API level and is not something controlled by the Terraform provider.
Bug Report
Describe the bug
In few minutes after creating a droplet, I've tried to plan and apply again.
Somehow the provider tries to move reserved IP to 'default' project, although it was explicetely assigned to another project.
Affected Resource(s)
Expected Behavior
Should be no change in IP assignment.
Actual Behavior
Looks like 'floatingip' appeared in my state although I've never requested it. Second plan/apply tries to replace it with reservedip.
Plan output:
Apply error:
Steps to Reproduce
Terraform Configuration Files
Debug Output
Will send via DigitalOcean support ticket
The text was updated successfully, but these errors were encountered: