Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 1.67 KB

vsphere_distributed_virtual_switch.md

File metadata and controls

87 lines (65 loc) · 1.67 KB

vsphere_distributed_virtual_switch

back

Index

Terraform

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

top

Example Usage

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

  # 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 DVS is in. This is required if the supplied path is not an absolute path containing a datacenter and there are multiple datacenters in your infrastructure."
  type        = string
  default     = null
}

variable "name" {
  description = "(required) - The name of the distributed virtual switch. This can be a name or path."
  type        = string
}

top

Datasource

data "vsphere_distributed_virtual_switch" "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_distributed_virtual_switch.this.id
}

output "uplinks" {
  description = "returns a list of string"
  value       = data.vsphere_distributed_virtual_switch.this.uplinks
}

output "this" {
  value = vsphere_distributed_virtual_switch.this
}

top