Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 1.48 KB

vsphere_compute_cluster.md

File metadata and controls

87 lines (65 loc) · 1.48 KB

vsphere_compute_cluster

back

Index

Terraform

terraform {
  required_providers {
    vsphere = ">= 1.25.0"
  }
}

top

Example Usage

module "vsphere_compute_cluster" {
  source = "./modules/vsphere/d/vsphere_compute_cluster"

  # datacenter_id - (optional) is a type of string
  datacenter_id = null
  # name - (required) is a type of string
  name = null
}

top

Variables

variable "datacenter_id" {
  description = "(optional) - The managed object ID of the datacenter the cluster is located in. Not required if using an absolute path."
  type        = string
  default     = null
}

variable "name" {
  description = "(required) - The name or absolute path to the cluster."
  type        = string
}

top

Datasource

data "vsphere_compute_cluster" "this" {
  # datacenter_id - (optional) is a type of string
  datacenter_id = var.datacenter_id
  # name - (required) is a type of string
  name = var.name
}

top

Outputs

output "id" {
  description = "returns a string"
  value       = data.vsphere_compute_cluster.this.id
}

output "resource_pool_id" {
  description = "returns a string"
  value       = data.vsphere_compute_cluster.this.resource_pool_id
}

output "this" {
  value = vsphere_compute_cluster.this
}

top