Skip to content
main.tf 965 B
Newer Older
Michael Kennedy's avatar
Michael Kennedy committed
# =================== #
# Deploying VMware VM #
# =================== #
terraform {
  required_providers {
    vsphere = {
      source = "hashicorp/vsphere"
      version = "2.2.0"
Michael Kennedy's avatar
Michael Kennedy committed
provider "vsphere" {
  vim_keep_alive = 30
  user           = var.vsphere_connection.user
  password       = var.vsphere_connection.password
  vsphere_server = var.vsphere_connection
Michael Kennedy's avatar
Michael Kennedy committed
}

# Master VM
module "vsphere_vm_master" {
Michael Kennedy's avatar
Michael Kennedy committed
  source                 = "../tf-vmware-ubuntu"
  provider = vsphere_connection
Michael Kennedy's avatar
Michael Kennedy committed
  vm_guest_config        = {}
  vm_template            = {}
  vsphere_connection     = {}

  master_nodes = {}
  worker_nodes = {}
Michael Kennedy's avatar
Michael Kennedy committed
}

# Worker VM
module "vsphere_vm_worker" {
  for_each               = var.worker_nodes
  source                 = "../tf-vmware-ubuntu"
  vm_guest_config        = {}
  vm_template            = {}
  vsphere_connection     = {}
  master_nodes           = {}
  worker_nodes           = {}
Michael Kennedy's avatar
Michael Kennedy committed
}