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

[doc] data source vsphere_virtual_machine for a template in a directory #830

Closed
nitrocode opened this issue Aug 20, 2019 · 5 comments · Fixed by #1545
Closed

[doc] data source vsphere_virtual_machine for a template in a directory #830

nitrocode opened this issue Aug 20, 2019 · 5 comments · Fixed by #1545
Labels
acknowledged Status: Issue or Pull Request Acknowledged community/contribution Community: Contribution Help Wanted enhancement Type: Enhancement size/s Relative Sizing: Small

Comments

@nitrocode
Copy link

Noticed that there is a folder argument for the vsphere_virtual_machine resource but not one for the equivalent data source. Instead, the name should be the full path of the template name.

This ticket is to update the documentation for this data source.

Affected Resource(s)

data source

  • vsphere_virtual_machine

Terraform Configuration Files

data "vsphere_virtual_machine" "template" {
  name          = "templates/windows_server"
  datacenter_id = "${data.vsphere_datacenter.datacenter.id}"
}
@aareet aareet added the documentation Type: Documentation label Aug 23, 2019
@hashibot
Copy link

This issue has been open 180 days with no activity. If this issue is reproducible with the latest version of the provider and with Terraform 0.12, please comment. Otherwise this issue will be closed in 30 days.

@hashibot hashibot added the stale Status: Stale label Apr 21, 2020
@nitrocode
Copy link
Author

This is still an inconsistency issue or data source feature request. I no longer have access to vsphere to test this out.

@aareet you added the documentation label to this ticket. Is the folder argument available for the data source but undocumented ?

@ghost ghost removed the stale Status: Stale label Apr 21, 2020
@arizvisa
Copy link
Contributor

arizvisa commented Aug 7, 2020

I can consider adding this to PR #1157 which adds a number of the resource attributes to the data source, but there's no +1s at all for this. :-/

@arizvisa
Copy link
Contributor

arizvisa commented Aug 9, 2020

@nitrocode: So here's an opinion question (mostly because I'm new to terraform, and newish to how people use the vSphere api).

So, we get a "Parent" attribute for the vm which contains the object id that the "vsphere_virtual_machine" is contained by, and a type (which is "Folder"). So getting the path from this and exporting it as a string shouldn't be too difficult.

But if the type is actually not-a-folder, should that path still be exported you think? This should be explicitly type checked, right?

@bill-rich bill-rich added enhancement Type: Enhancement community/contribution Community: Contribution Help Wanted acknowledged Status: Issue or Pull Request Acknowledged size/s Relative Sizing: Small and removed documentation Type: Documentation labels Aug 18, 2020
iBrandyJackson pushed a commit that referenced this issue Jan 13, 2022
)

* Update the examples for the `vsphere_virtual_machine` data source

- Updates the existing example for the `vsphere_virtual_machine` data source.
- Adds a second example demonstrating the use of the full path in the `name` argument in the `vsphere_virtual_machine` data source.
- Minor context corrections.

Reference: #830

Signed-off-by: Ryan Johnson <[email protected]>

* Update `virtual_machine.html.markdown`

Corrects a minor typo. 

Signed-off-by: Ryan Johnson <[email protected]>
@github-actions
Copy link

I'm going to lock this issue 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 similar to this, 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 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
acknowledged Status: Issue or Pull Request Acknowledged community/contribution Community: Contribution Help Wanted enhancement Type: Enhancement size/s Relative Sizing: Small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants