Skip to content

phunyguy/terraform-vsphere-vm-cloud-init

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-vsphere-vm-cloud-init

Terraform Version License: MIT

Deploy cloud images to vCenter using cloud-init userdata.

This module is designed to work with the OVA versions of Ubuntu Cloud Images or other vApp images.

Information

The common vSphere customiztions conflict with vApp deployments and are not used. vApp customiztions are used to pass configuration to the VM.

Additional Disks Example

  additional_disks = {
    disk1 = {
      size_gb          = 10,
      thin_provisioned = false,
      eagerly_scrub    = true
      datastore_id     = "datastore-20273"
    },
    disk2 = {
      size_gb          = 10,
      thin_provisioned = true,
      eagerly_scrub    = true
    }
  }

Requirements

Name Version
terraform >= 0.13.4
vsphere >= 1.25.0

Providers

Name Version
vsphere >= 1.25.0

Modules

No Modules.

Resources

Name
vsphere_compute_cluster
vsphere_datacenter
vsphere_datastore
vsphere_network
vsphere_virtual_machine
vsphere_virtual_machine

Inputs

Name Description Type Default Required
additional_disks Disks to add in addition to the disks in the template. map(map(string)) {} no
cluster The name of the cluster to deploy this virtual machine to. string n/a yes
content_library The name of content library that contains the required template. string null no
cpu_hot_add_enabled Allow CPUs to be added to this virtual machine while it is running. bool null no
cpu_hot_remove_enabled Allow CPUs to be removed to this virtual machine while it is running. bool null no
cpu_reservation The amount of CPU (in MHz) guaranteed for this virtual. number null no
datacenter The name of the datacenter to deploy this virtual machine to. string n/a yes
datastore The name of the datastore to deploy this virtual machine to. string n/a yes
disk_sizes List of disk sizes (in GB) to override for the template disks. list(number) null no
eagerly_scrub All allocated space for the vmdk is zeroed out. If enabled, thin provisioned must be false. bool false no
enable_disk_uuid Expose the UUIDs of attached virtual disks to the virtual machine, allowing access to them in the guest. bool true no
memory The amount of memory (in MB) for the virtual machine. number 4096 no
memory_hot_add_enabled Allow memory to be added to this virtual machine while it is running. bool null no
memory_reservation The amount of memory (in MB) guaranteed for this virtual machine. number null no
network The name of the network to use for this virtual machine. string n/a yes
network_type The network type for each network interface. string null no
num_cores_per_socket The number of cores to distribute among the CPUs in this virtual machine. If specified, the value supplied to num_cpus must be evenly divisible by this value. number 1 no
num_cpus The number of CPUs for this virtual machine. number 2 no
scsi_type Type of scsi controller. acceptable values lsilogic, pvscsi. string "" no
thin_provisioned Space for the vmdk disk allocated as needed. bool true no
vapp_properties The network type for each network interface. any n/a yes
vm_folder The name of the folder for this virtual machine. string "" no
vm_name The name of the virtual machine. string n/a yes
vm_template The name of the template to cone. string n/a yes
vmrp The name of an existing resource pool to place the VMs string null no

Outputs

No output.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 91.3%
  • Smarty 8.7%