vsphere_datacenter

Provides a VMware vSphere datacenter resource. This can be used as the primary container of inventory objects such as hosts and virtual machines.

Example Usages

Create datacenter on the root folder:

resource "vsphere_datacenter" "prod_datacenter" {
  name       = "my_prod_datacenter"
}

Create datacenter on a subfolder:

resource "vsphere_datacenter" "research_datacenter" {
  name       = "my_research_datacenter"
  folder     = "/research/"
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
  • folder - (Optional) The folder where the datacenter should be created. Forces a new resource if changed.
  • tags - (Optional) The IDs of any tags to attach to this resource. See here for a reference on how to apply tags.
  • custom_attributes - (Optional) Map of custom attribute ids to value strings to set for datacenter resource. See here for a reference on how to set values for custom attributes.

Attribute Reference

The only attribute exported is id, which is the name of the datacenter.

© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/vsphere/r/datacenter.html