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

Fix hardware version bug #2011

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Fix hardware version bug #2011

merged 1 commit into from
Sep 1, 2023

Conversation

appilon
Copy link
Contributor

@appilon appilon commented Sep 1, 2023

Description

vSphere refers to hardware_version in a vmx-xx format. The attribute is converted directly into an integer within provider schema I assume because it made version comparison more intuitive. HOWEVER because vSphere does in fact leftpad the integer with a leading 0 if the value is < 10, we could have left the attribute as is when initially designed and relied on lexicographical comparisons.

A recent change #1995 fixed an issue of setting the incorrect hardware version when using a template which has revealed this bug, that we naively did not leftpad the integer with a 0 when < 10. This change fixes this.

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:

$ make testacc TESTARGS='-run=TestAccXXX'
no regressions on VM resource
...

Release Note

Release note for CHANGELOG:

* `r/virtual_machine`: Fix hardware version conversion ([#2011](https://github.com/hashicorp/terraform-provider-vsphere/pull/2011))

References

Closes #2005

@appilon appilon requested a review from a team as a code owner September 1, 2023 16:25
@github-actions github-actions bot added provider Type: Provider size/xs Relative Sizing: Extra-Small labels Sep 1, 2023
@appilon appilon mentioned this pull request Sep 1, 2023
2 tasks
@appilon appilon merged commit 838180c into main Sep 1, 2023
@appilon appilon deleted the fix-hardware-version branch September 1, 2023 16:30
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
provider Type: Provider size/xs Relative Sizing: Extra-Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v2.4.2 breaks with "customize" block - v2.4.1 works
2 participants