back
terraform {
required_providers {
vsphere = ">= 1.25.0"
}
}
top
module "vsphere_datacenter" {
source = "./modules/vsphere/d/vsphere_datacenter"
# name - (optional) is a type of string
name = null
}
top
variable "name" {
description = "(optional) - The name of the datacenter. This can be a name or path.\tCan be omitted if there is only one datacenter in your inventory."
type = string
default = null
}
top
data "vsphere_datacenter" "this" {
# name - (optional) is a type of string
name = var.name
}
top
output "id" {
description = "returns a string"
value = data.vsphere_datacenter.this.id
}
output "this" {
value = vsphere_datacenter.this
}
top