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

Mutliple tier0s associated with projects ordering generate change in every apply #1535

Open
frederic-urban opened this issue Feb 11, 2025 · 1 comment
Labels
awaiting-response Awaiting Response bug Bug

Comments

@frederic-urban
Copy link

Describe the bug

Hi,

We discovered that when we add multiple tier0s to a project, they are reorderred a each apply:

Here is the ressource
resource "nsxt_policy_project" "project" {
display_name = "${var.project_name}"

tier0_gateway_paths = local.tier0_path_list

tier0_gateway_paths = ["/infra/tier-0s/93a84740-3f69-4a95-a83c-9f2371897815", "/infra/tier-0s/33a2e2b2-a03d-4bc7-a6f8-e06f6dd29a24","/infra/tier-0s/966b4b5e-1051-4f67-aea0-5b7c8543b83e"]
site_info {
edge_cluster_paths = local.edge_path_list
}
}

Here is the output of the second apply:

module.mod-nsx-project.nsxt_policy_project.project will be updated in-place

~ resource "nsxt_policy_project" "project" {
id = "3c09a8cc-27e5-46dc-bf48-152c4efb9c29"
~ tier0_gateway_paths = [
+ "/infra/tier-0s/93a84740-3f69-4a95-a83c-9f2371897815",
"/infra/tier-0s/33a2e2b2-a03d-4bc7-a6f8-e06f6dd29a24",
"/infra/tier-0s/966b4b5e-1051-4f67-aea0-5b7c8543b83e",
- "/infra/tier-0s/93a84740-3f69-4a95-a83c-9f2371897815",
]
# (7 unchanged attributes hidden)

    # (1 unchanged block hidden)
}

Sorting result of the tier0s list from API and comparasion with sorted tier0s from tfstate could fix the issue.

Thanks,

Reproduction steps

  1. Create project with multiple tier0s
  2. Terraform Apply once
  3. Terraform Reapply
    ...

Expected behavior

No change detected as id orderred are the same

Additional context

No response

@frederic-urban frederic-urban added the bug Bug label Feb 11, 2025
@annakhm
Copy link
Collaborator

annakhm commented Feb 12, 2025

Hi @frederic-urban, thank you for flagging this. What is your NSX version?

I tested with latest NSX and the issue does not reproduce for me. There was a change in NSX 4.2 fixing unordered lists problem.

@salv-orlando salv-orlando added the awaiting-response Awaiting Response label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response Awaiting Response bug Bug
Projects
None yet
Development

No branches or pull requests

3 participants