Skip to content

feat: add DiffSuppressFunc for network_adapters on r/host_virtual_switch #2388

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

spacegospod
Copy link
Contributor

@spacegospod spacegospod commented Apr 23, 2025

Description

vCenter can occasionally rearrange the adapters on a host switch bond bridge structure. So far we've identified that this may occur after exiting maintenance mode.

The actual order of these adapters is not important, the significant ordering of active and standby nics is tracked on a separate policy structure on the switch configuration.
The vSphere UI also ignores ordering changes for this property and applies descending alphanumerical sorting.

I'm adding a diff supress function on the property that ignores ordering changes

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

N/A

I tested my changes by running existing tests and modifying the environment from outside terraform to trigger changes on the switch bond bridge

Release Note

Release note for CHANGELOG:

NONE

References

Closes #2018

@spacegospod spacegospod self-assigned this Apr 23, 2025
@spacegospod spacegospod requested a review from a team as a code owner April 23, 2025 12:58
@tenthirtyam tenthirtyam changed the title feat: add DiffSuppressFunc for 'network_adapters' on r/host_virtual_switch feat: add DiffSuppressFunc for 'network_adapters' on r/host_virtual_switch Apr 23, 2025
@tenthirtyam tenthirtyam added the enhancement Enhancement label Apr 23, 2025
@tenthirtyam tenthirtyam added this to the v2.13.0 milestone Apr 23, 2025
Copy link
Contributor

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tenthirtyam tenthirtyam changed the title feat: add DiffSuppressFunc for 'network_adapters' on r/host_virtual_switch feat: add DiffSuppressFunc for network_adapters on r/host_virtual_switch Apr 23, 2025
@tenthirtyam tenthirtyam merged commit 87d48e0 into main Apr 23, 2025
7 checks passed
@tenthirtyam tenthirtyam deleted the feat/host-switch/supress-nic-diff branch April 23, 2025 15:50
Copy link

This functionality has been released in v2.13.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vsphere_host_virtual_switch resource attempts to change the VMNIC order
3 participants