Skip to content

feat: add folder field for d/vsphere_virtual_machine #2119

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

Conversation

vasilsatanasov
Copy link
Contributor

Description

Added folder field to d/vsphere_virtual_machine to mitigate the 80 characters limitation of the name field.

Added e2e test

Updated documentation

Fixes #1262

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=TestAccDataSourceVSphereVirtualMachine'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccDataSourceVSphereVirtualMachine -timeout 360m
?       github.com/hashicorp/terraform-provider-vsphere [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/administrationroles    [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/clustercomputeresource  [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/computeresource [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/contentlibrary  [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/customattribute [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/datacenter      [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/datastore       [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/dvportgroup     [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/envbrowse       [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/folder  [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/guestoscustomizations   [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/hostsystem      [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/network [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/nsx     [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/ovfdeploy       [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/provider        [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/resourcepool    [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/spbm    [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/structure       [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/storagepod      [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/testhelper      [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/utils   [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/vappcontainer   [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/virtualmachine  [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/vsanclient      [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/vsansystem      [no test files]
?       github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/vmworkflow     [no test files]
=== RUN   TestAccDataSourceVSphereVirtualMachine_basic
--- PASS: TestAccDataSourceVSphereVirtualMachine_basic (79.84s)
=== RUN   TestAccDataSourceVSphereVirtualMachine_noDatacenterAndAbsolutePath
--- PASS: TestAccDataSourceVSphereVirtualMachine_noDatacenterAndAbsolutePath (73.91s)
=== RUN   TestAccDataSourceVSphereVirtualMachine_uuid
--- PASS: TestAccDataSourceVSphereVirtualMachine_uuid (81.98s)
=== RUN   TestAccDataSourceVSphereVirtualMachine_moid
--- PASS: TestAccDataSourceVSphereVirtualMachine_moid (81.87s)
=== RUN   TestAccDataSourceVSphereVirtualMachine_nameAndFolder
--- PASS: TestAccDataSourceVSphereVirtualMachine_nameAndFolder (106.29s)
PASS
ok      github.com/hashicorp/terraform-provider-vsphere/vsphere 424.491s
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/viapi   (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/virtualdisk     (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/virtualdevice  (cached) [no tests to run]

Release Note

Release note for CHANGELOG:

Added `folder` field to  `d/vsphere_virtual_machine` to mitigate the 80 characters limitation of the `name` field.

References

#1262

@vasilsatanasov vasilsatanasov requested a review from a team as a code owner January 22, 2024 14:19
@tenthirtyam tenthirtyam changed the title Add folder field for d/vsphere_virtual_machine feat: add folder field for d/vsphere_virtual_machine Jan 22, 2024
@tenthirtyam tenthirtyam added this to the v2.7.0 milestone Jan 22, 2024
@tenthirtyam tenthirtyam added the enhancement Enhancement label Jan 22, 2024
@tenthirtyam tenthirtyam force-pushed the topic/vasilsatanasov/issue-1262 branch from 5095a72 to 0af26bc Compare January 22, 2024 22:03
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.

Minor text changes requested, but otherwise looks great.

Added `folder` field to  `d/vsphere_virtual_machine` to mitigate the 80
characters limitation of the `name` field.

Added e2e test

Updated documentation

Fixes vmware#1262

Signed-off-by: Vasil Atanasov <vasila@vmware.com>
@vasilsatanasov vasilsatanasov force-pushed the topic/vasilsatanasov/issue-1262 branch from 0af26bc to 52eeaf2 Compare January 23, 2024 07:03
@tenthirtyam tenthirtyam merged commit 4644a86 into vmware:main Jan 23, 2024
Copy link

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 Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

80 character name limit is invalid when using d/virtual_machine
3 participants