Terraform.VirtualMachines/terraform/main.tf
djpbessems e5d4c577f8
Some checks failed
continuous-integration/drone/push Build is failing
Initial commit; will fail :)
2021-02-02 13:06:52 +01:00

36 lines
989 B
HCL

terraform {
backend "pg" {}
}
provider "vsphere" {
version = "1.24.1"
vsphere_server = var.vcenter_server
user = var.vsphere_username
password = var.vsphere_password
allow_unverified_ssl = true
}
data "vsphere_datacenter" "dc" {
name = var.vsphere_datacenter
}
data "vsphere_resource_pool" "pool" {
name = "/${var.vsphere_datacenter}/host/${var.vsphere_hostip}/Resources"
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_datastore" "vmdatastore" {
name = var.vsphere_vmdatastore
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_datastore" "cldatastore" {
name = var.vsphere_cldatastore
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_network" "network" {
name = var.vsphere_network
datacenter_id = data.vsphere_datacenter.dc.id
}