Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] API returns data in a different order and generates meaningless change #439

Closed
Victor-D opened this issue Jul 5, 2023 · 0 comments · Fixed by #458
Closed

[BUG] API returns data in a different order and generates meaningless change #439

Victor-D opened this issue Jul 5, 2023 · 0 comments · Fixed by #458

Comments

@Victor-D
Copy link

Victor-D commented Jul 5, 2023

Describe the bug

API returns data in a different order and it generates meaningless change :

resource : ovh_iploadbalancing_http_frontend.frontend_http**.dedicated_ipfo**

I think the order does not matter so a sort() should be added in the provider to always return a sorted list and avoid meaningless change like this.

Terraform Version

Terraform 1.1.9

OVH Terraform Provider Version

0.28.1

Affected Resource(s)

ovh_iploadbalancing_http_frontend.frontend_http

Terraform Configuration Files

resource "ovh_iploadbalancing_http_frontend" "frontend_http" {
  service_name    = local.iplb_id
  display_name    = format("frontend-webm-%s-%s-http", var.environment, var.cluster_id)
  zone            = "all"
  port            = "80"
  ssl             = false
  default_farm_id = ovh_iploadbalancing_http_farm.farm_http.id
  #
  http_header    = ["X-Forwarded-For %ci if { src 127.0.0.1 }"]
  dedicated_ipfo = [for v in local.ipfo_ip : v.ip]
  # Destroy after the backend
  depends_on = [ovh_iploadbalancing_http_farm_server.backend_http]
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

No change should be detected.

Actual Behavior

Terraform detects a meaningless change then conclude it has to remove and add the same ip :

 dedicated_ipfo :
[
delete
"46.105.76.242/32"
no-op
"87.98.252.134/32"
create
"46.105.76.242/32"
]
no-op
id :
"167269"

Steps to Reproduce

N/A

References

N/A

Additional context

N/A

@yomovh yomovh self-assigned this Aug 25, 2023
@yomovh yomovh mentioned this issue Aug 25, 2023
2 tasks
@yomovh yomovh linked a pull request Aug 25, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants