terraform-provider-digitalocean
terraform-provider-digitalocean copied to clipboard
Forced replacement of load balancer resource due to change of urn in API response
Bug Report
Describe the bug
Running terraform apply
on a load balancer resource started replacing the load balancer due to the API returning an added URN field.
Affected Resource(s)
- digitalocean_loadbalancer
Expected Behavior
I expect that running terraform apply
multiple times with the same configuration for the load balancer doesn't destroy and re-create the load balancer.
Actual Behavior
Currently running terraform apply
with the same terraform script will recreate the load balancer.
Steps to Reproduce
-
terraform apply
creates the load balancer -
terraform apply
replaces the load balancer due to the added URN field
Terraform Configuration Files
resource "digitalocean_loadbalancer" "ingress" {
name = var.name
region = local.region
size = local.loadbalancer_size
enable_proxy_protocol = true
forwarding_rule {
entry_port = 443
entry_protocol = "https"
target_port = 80
target_protocol = "http"
certificate_name = data.digitalocean_certificate.wildcard.name
}
forwarding_rule {
entry_port = 80
entry_protocol = "http"
target_port = 80
target_protocol = "http"
}
healthcheck {
port = 80
protocol = "http"
path = "/ping"
}
droplet_tag = digitalocean_tag.allow_http.name
vpc_uuid = digitalocean_vpc.deployment.id
}
Terraform version
1.3.8
Debug Output
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:
# digitalocean_loadbalancer.ingress has changed
~ resource "digitalocean_loadbalancer" "ingress" {
id = "5e6eab7b-d026-4ceb-a8da-b5b5dd064c2f"
name = "REDACTED"
+ urn = "do:loadbalancer:5e6eab7b-d026-4ceb-a8da-b5b5dd064c2f"
# (10 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
Additional context
Provider version 2.25.2