Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: update vsphere_folder #2183

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion website/docs/d/folder.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ description: |-
# vsphere\_folder

The `vsphere_folder` data source can be used to get the general attributes of a
vSphere inventory folder. Paths are absolute and must include the datacenter.
vSphere inventory folder. The data source supports creating folders of the 5
major types - datacenter folders, host and cluster folders, virtual machine
folders, storage folders, and network folders.

Paths are absolute and must include the datacenter.

## Example Usage

Expand Down
18 changes: 9 additions & 9 deletions website/docs/r/folder.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ description: |-

The `vsphere_folder` resource can be used to manage vSphere inventory folders.
The resource supports creating folders of the 5 major types - datacenter
folders, host and cluster folders, virtual machine folders, datastore folders,
folders, host and cluster folders, virtual machine folders, storage folders,
and network folders.

Paths are always relative to the specific type of folder you are creating.
Subfolders are discovered by parsing the relative path specified in `path`, so
A subfolder is discovered by parsing the relative path specified in `path`, so
`foo/bar` will create a folder named `bar` in the parent folder `foo`, as long
as that folder exists.

## Example Usage

The basic example below creates a virtual machine folder named
`terraform-test-folder` in the default datacenter's VM hierarchy.
`terraform-test-folder` in the default datacenter's VM hierarchy.

```hcl
data "vsphere_datacenter" "dc" {}

resource "vsphere_folder" "folder" {
path = "terraform-test-folder"
type = "vm"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
datacenter_id = data.vsphere_datacenter.dc.id
}
```

Expand All @@ -51,13 +51,13 @@ data "vsphere_datacenter" "dc" {}
resource "vsphere_folder" "parent" {
path = "terraform-test-parent"
type = "vm"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
datacenter_id = data.vsphere_datacenter.dc.id
}

resource "vsphere_folder" "folder" {
path = "${vsphere_folder.parent.path}/terraform-test-folder"
type = "vm"
datacenter_id = "${data.vsphere_datacenter.dc.id}"
datacenter_id = data.vsphere_datacenter.dc.id
}
```

Expand Down Expand Up @@ -92,13 +92,13 @@ modifying the name (the part after the last `/`), your folder will be renamed.
~> **NOTE:** Tagging support is unsupported on direct ESXi connections and
requires vCenter 6.0 or higher.

* `custom_attributes` - (Optional) Map of custom attribute ids to attribute
value strings to set for folder. See [here][docs-setting-custom-attributes]
* `custom_attributes` - (Optional) Map of custom attribute ids to attribute
value strings to set for folder. See [here][docs-setting-custom-attributes]
for a reference on how to set values for custom attributes.

[docs-setting-custom-attributes]: /docs/providers/vsphere/r/custom_attribute.html#using-custom-attributes-in-a-supported-resource

~> **NOTE:** Custom attributes are unsupported on direct ESXi connections
~> **NOTE:** Custom attributes are unsupported on direct ESXi connections
and require vCenter.

## Attribute Reference
Expand Down