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

Update content_library_item data source docs #1507

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions website/docs/d/content_library_item.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,37 @@ layout: "vsphere"
page_title: "VMware vSphere: vsphere_content_library_item"
sidebar_current: "docs-vsphere-data-source-content-library-item"
description: |-
Provides a VMware Content Library item data source.
Provides a VMware vSphere content library item data source.
---

# vsphere\_content\_library\_item

The `vsphere_content_library_item` data source can be used to discover the ID of a Content Library item.
The `vsphere_content_library_item` data source can be used to discover the ID of a content library item.

~> **NOTE:** This resource requires vCenter and is not available on direct ESXi
connections.
~> **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections.

## Example Usage

```hcl
data "vsphere_content_library" "library" {
name = "Content Library Test"
name = "Content Library"
}

data "vsphere_content_library_item" "item" {
name = "Ubuntu Bionic 18.04"
name = "ovf-ubuntu-server-lts"
type = "ovf"
library_id = data.vsphere_content_library.library.id
}

data "vsphere_content_library_item" "item" {
name = "tpl-ubuntu-server-lts"
type = "vm-template"
library_id = data.vsphere_content_library.library.id
}

data "vsphere_content_library_item" "item" {
name = "iso-ubuntu-server-lts"
type = "iso"
library_id = data.vsphere_content_library.library.id
}
```
Expand All @@ -31,11 +43,10 @@ data "vsphere_content_library_item" "item" {

The following arguments are supported:

* `name` - (Required) The name of the Content Library.
* `library_id` - (Required) The ID of the Content Library the item exists in.

* `name` - (Required) The name of the content library item.
* `library_id` - (Required) The ID of the content library in which the item exists.
* `type` - (Required) The type for the content library item. One of `ovf`, `vm-template`, or `iso`

## Attribute Reference

* `id` - The UUID of the Content Library item.
* `type` - The Content Library type. Can be ovf, iso, or vm-template.
* `id` - The UUID of the content library item.