terraform { backend "pg" {} required_providers { vsphere = { source = "hashicorp/vsphere" version = "~> 1.25.0" } } } provider "vsphere" { vsphere_server = var.hv_fqdn user = var.hv_username password = var.hv_password allow_unverified_ssl = true } data "vsphere_datacenter" "dc" { name = var.hv_datacenter } data "vsphere_resource_pool" "pool" { name = "/${var.hv_datacenter}/host/${var.hv_host}/Resources" datacenter_id = data.vsphere_datacenter.dc.id } data "vsphere_host" "host" { name = var.hv_host datacenter = data.vsphere_datacenter.dc.id } data "vsphere_datastore" "datastore" { name = var.hv_datastore datacenter_id = data.vsphere_datacenter.dc.id } data "vsphere_network" "network" { name = var.hv_network datacenter_id = data.vsphere_datacenter.dc.id }