Provides a VMware vSphere datacenter resource. This can be used as the primary container of inventory objects such as hosts and virtual machines.
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/"
}
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. 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 value strings to set for datacenter resource. See here for a reference on how to set values for custom attributes. NOTE: Custom attributes are unsupported on direct ESXi connections and require vCenter.
The only attribute exported is id, which is the name of the datacenter.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/vsphere/r/datacenter.html