11# Terraform vSphere Module
22
3- ![ Terraform Version] ( https://img.shields.io/badge/Terraform-0.12.6-green.svg ) [ ![ TF Registry] ( https://img.shields.io/badge/terraform-registry-blue.svg )] ( https://registry.terraform.io/modules/Terraform-VMWare-Modules/vm/vsphere/ ) [ ![ Changelog] ( https://img.shields.io/badge/changelog-release-green.svg )] ( https://github.com/Terraform-VMWare-Modules/terraform-vsphere-vm/releases ) [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( LICENSE )
3+ ![ Terraform Version] ( https://img.shields.io/badge/Terraform-0.12.6-green.svg ) [ ![ TF Registry] ( https://img.shields.io/badge/terraform-registry-blue.svg )] ( https://registry.terraform.io/modules/Terraform-VMWare-Modules/vm/vsphere/ ) [ ![ Changelog] ( https://img.shields.io/badge/changelog-release-green.svg )] ( https://github.com/Terraform-VMWare-Modules/terraform-vsphere-vm/releases ) [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( LICENSE )
44
55For Virtual Machine Provisioning with (Linux/Windows) customization. Thanks to the new enhancements introduced in Terraform v0.12.6 this module include most of the advance features that are available in the resource ` vsphere_virtual_machine ` .
66
@@ -54,7 +54,7 @@ module "example-server-windowsvm" {
5454 source = "Terraform-VMWare-Modules/vm/vsphere"
5555 version = "X.X.X"
5656 vmtemp = "TemplateName"
57- is_windows_image = " true"
57+ is_windows_image = true
5858 instances = 1
5959 vmname = "example-server-windows"
6060 vmrp = "esxi/Resources"
@@ -75,7 +75,7 @@ There are number of switches defined in the module, where you can use to enable
7575
7676### Main Feature Switches
7777
78- - You can use ` is_windows_image = " true" ` to set the customization type to Windows (By default it is set to Linux customization)
78+ - You can use ` is_windows_image = true ` to set the customization type to Windows (By default it is set to Linux customization)
7979- You can use ` data_disk_size_gb = [20,30] ` to add additional data disks (Supported in both Linux and Windows deployment)
8080 - Above switch will create two additional disk of capacity 10 and 30gb for the VM.
8181 - You can include ` thin_provisioned ` switch to define disk type for each additional disk.
@@ -101,9 +101,9 @@ module "example-server-windowsvm-advanced" {
101101 ram_size = 2096
102102 cpu_reservation = 2000
103103 memory_reservation = 2000
104- cpu_hot_add_enabled = " true"
105- cpu_hot_remove_enabled = " true"
106- memory_hot_add_enabled = " true"
104+ cpu_hot_add_enabled = true
105+ cpu_hot_remove_enabled = true
106+ memory_hot_add_enabled = true
107107 vmname = "AdvancedVM"
108108 vmdomain = "somedomain.com"
109109 network_cards = ["VM Network", "test-network"] #Assign multiple cards
@@ -114,7 +114,7 @@ module "example-server-windowsvm-advanced" {
114114 "test" = ["", "192.168.0.3"]
115115 }
116116 data_disk_size_gb = [10, 5] // Aditional Disk to be used
117- thin_provisioned = [" true", " false" ]
117+ thin_provisioned = [true, false]
118118 disk_label = ["tpl-disk-1"]
119119 data_disk_label = ["label1", "label2"]
120120 disk_datastore = "vsanDatastore" // This will store Template disk in the defined disk_datastore
@@ -129,12 +129,12 @@ module "example-server-windowsvm-advanced" {
129129 "terraform-test-category" = "terraform-test-tag"
130130 "terraform-test-category-02" = "terraform-test-tag-02"
131131 }
132- enable_disk_uuid = " true"
133- auto_logon = " true"
132+ enable_disk_uuid = true
133+ auto_logon = true
134134 run_once = ["command01", "command02"] // You can also run Powershell commands
135135 orgname = "Terraform-Module"
136136 workgroup = "Module-Test"
137- is_windows_image = " true"
137+ is_windows_image = true
138138 firmware = "efi"
139139 local_adminpass = "Password@Strong"
140140}
0 commit comments