Skip to content

Commit

Permalink
docs: update vsphere_folder (#2183)
Browse files Browse the repository at this point in the history
  • Loading branch information
tenthirtyam authored Apr 29, 2024
1 parent eb60a80 commit 5a4d2bd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
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

0 comments on commit 5a4d2bd

Please sign in to comment.