Skip to content

Commit 3f43d1d

Browse files
author
Arman Keyoumarsi
committed
Added Info to ReadMe
1 parent 1e489ab commit 3f43d1d

File tree

6 files changed

+92
-39
lines changed

6 files changed

+92
-39
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ For Virtual Machine Provisioning with (Linux/Windows) customization. Thanks to t
66

77
:warning: The new version of this module only works with terraform version 0.12.6 and above :warning:
88

9-
> This module now replace the functionality of the following modules:
10-
>
11-
> - [`Terraform-VMWare-Modules-vm2nic`](https://registry.terraform.io/modules/Terraform-VMWare-Modules/vm2nic/vsphere/0.1.0)
12-
> - [`Terraform-VMWare-Modules-vm3nic`](https://registry.terraform.io/modules/Terraform-VMWare-Modules/vm3nic/vsphere/0.1.0)
13-
149
## Deploys (Single/Multiple) Virtual Machines to your vSphere environment
1510

1611
This Terraform module deploys single or multiple virtual machines of type (Linux/Windows) with following features:
@@ -30,6 +25,7 @@ This Terraform module deploys single or multiple virtual machines of type (Linux
3025
- Ability to define different datastores for data disks.
3126
- Ability to define different scsi_controllers per disk, including data disks.
3227
- Ability to define network type per interface and disk label per attached disk.
28+
- Ability to define depend on using variable vm_depends_on
3329

3430
> Note: For module to work it needs number of required variables corresponding to an existing resources in vSphere. Please refer to variable section for the list of required variables.
3531
@@ -42,7 +38,7 @@ You can also download the entire module and use your own predefined variables to
4238
```hcl
4339
module "example-server-linuxvm" {
4440
source = "Terraform-VMWare-Modules/vm/vsphere"
45-
version = "1.2.0"
41+
version = "1.3.0"
4642
vmtemp = "TemplateName"
4743
instances = 1
4844
vmname = "example-server-windows"
@@ -95,7 +91,7 @@ Below is an example of windows deployment with some of the available feature set
9591
```hcl
9692
module "example-server-windowsvm-advanced" {
9793
source = "Terraform-VMWare-Modules/vm/vsphere"
98-
version = "1.2.0"
94+
version = "1.3.0"
9995
dc = "Datacenter"
10096
vmrp = "cluster/Resources" #Works with ESXi/Resources
10197
vmfolder = "Cattle"

examples/linux/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Following example contains the bare minimum options to be configured for the Lin
1313
```hcl
1414
module "example-server-linuxvm" {
1515
source = "Terraform-VMWare-Modules/vm/vsphere"
16-
version = "1.2.0"
16+
version = "Latest X.X.X"
1717
vmtemp = "TemplateName"
1818
instances = 1
1919
vmname = "example-server-windows"
@@ -36,7 +36,7 @@ Below example will deploy 2 instance of a virtual machine from a linux template.
3636
```hcl
3737
module "example-server-linuxvm-withdatadisk" {
3838
source = "Terraform-VMWare-Modules/vm/vsphere"
39-
version = "1.2.0"
39+
version = "Latest X.X.X"
4040
dc = "Datacenter"
4141
vmrp = "cluster/Resources"
4242
vmfolder = "Cattle"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Simple Linux VM deployment
2+
module "example-server-linuxvm" {
3+
source = "Terraform-VMWare-Modules/vm/vsphere"
4+
version = "Latest X.X.X"
5+
vmtemp = "TemplateName"
6+
instances = 1
7+
vmname = "example-server-windows"
8+
vmrp = "esxi/Resources"
9+
network_cards = ["Name of the Port Group in vSphere"]
10+
ipv4 = {
11+
"Name of the Port Group in vSphere" = ["10.0.0.1"] # To use DHCP create empty string for each instance
12+
}
13+
dc = "Datacenter"
14+
datastore = "Data Store name(use ds_cluster for datastore cluster)"
15+
}
16+
// Example of Linux VM with more Advanced Features
17+
module "example-server-linuxvm-advanced" {
18+
source = "Terraform-VMWare-Modules/vm/vsphere"
19+
vm_depends_on = [module.example-server-linuxvm] # This force the second module to wait for first VM to be created first
20+
version = "Latest X.X.X"
21+
dc = "Datacenter"
22+
vmrp = "cluster/Resources"
23+
vmfolder = "Cattle"
24+
ds_cluster = "Datastore Cluster"
25+
vmtemp = "TemplateName"
26+
instances = 2
27+
cpu_number = 2
28+
ram_size = 2096
29+
cpu_hot_add_enabled = "true"
30+
cpu_hot_remove_enabled = "true"
31+
memory_hot_add_enabled = "true"
32+
vmname = "AdvancedVM"
33+
vmdomain = "somedomain.com"
34+
network_cards = ["VM Network", "test-network"]
35+
ipv4submask = ["24", "8"]
36+
ipv4 = {
37+
"VM Network" = ["192.168.0.4", ""] // Here the first instance will use Static Ip and Second set to DHCP
38+
"test" = ["", "192.168.0.3"]
39+
}
40+
disk_label = ["tpl-disk-1"]
41+
data_disk_label = ["label1", "label2"]
42+
scsi_type = "lsilogic" # "pvscsi"
43+
scsi_controller = 0
44+
data_disk_scsi_controller = [0, 1]
45+
disk_datastore = "vsanDatastore"
46+
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
47+
data_disk_size_gb = [10, 5] // Aditional Disks to be used
48+
thin_provisioned = ["true", "false"]
49+
vmdns = ["192.168.0.2", "192.168.0.1"]
50+
vmgateway = "192.168.0.1"
51+
network_type = ["vmxnet3", "vmxnet3"]
52+
tags = {
53+
"terraform-test-category" = "terraform-test-tag"
54+
"terraform-test-category-02" = "terraform-test-tag-02"
55+
}
56+
}
57+

examples/linux/main.tf

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Simple Linux VM deployment
22
module "example-server-linuxvm" {
33
source = "Terraform-VMWare-Modules/vm/vsphere"
4-
version = "1.1.0"
4+
version = "Latest X.X.X"
55
vmtemp = "TemplateName"
66
instances = 1
77
vmname = "example-server-windows"
@@ -16,7 +16,7 @@ module "example-server-linuxvm" {
1616
// Example of Linux VM with more Advanced Features
1717
module "example-server-linuxvm-advanced" {
1818
source = "Terraform-VMWare-Modules/vm/vsphere"
19-
version = "1.1.0"
19+
version = "Latest X.X.X"
2020
dc = "Datacenter"
2121
vmrp = "cluster/Resources"
2222
vmfolder = "Cattle"
@@ -36,18 +36,18 @@ module "example-server-linuxvm-advanced" {
3636
"VM Network" = ["192.168.0.4", ""] // Here the first instance will use Static Ip and Second set to DHCP
3737
"test" = ["", "192.168.0.3"]
3838
}
39-
disk_label = ["tpl-disk-1"]
40-
data_disk_label = ["label1", "label2"]
41-
scsi_type = "lsilogic" # "pvscsi"
42-
scsi_controller = 0
43-
data_disk_scsi_controller = [0, 1]
44-
disk_datastore = "vsanDatastore"
45-
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
46-
data_disk_size_gb = [10, 5] // Aditional Disks to be used
47-
thin_provisioned = ["true", "false"]
48-
vmdns = ["192.168.0.2", "192.168.0.1"]
49-
vmgateway = "192.168.0.1"
50-
network_type = ["vmxnet3", "vmxnet3"]
39+
disk_label = ["tpl-disk-1"]
40+
data_disk_label = ["label1", "label2"]
41+
scsi_type = "lsilogic" # "pvscsi"
42+
scsi_controller = 0
43+
data_disk_scsi_controller = [0, 1]
44+
disk_datastore = "vsanDatastore"
45+
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
46+
data_disk_size_gb = [10, 5] // Aditional Disks to be used
47+
thin_provisioned = ["true", "false"]
48+
vmdns = ["192.168.0.2", "192.168.0.1"]
49+
vmgateway = "192.168.0.1"
50+
network_type = ["vmxnet3", "vmxnet3"]
5151
tags = {
5252
"terraform-test-category" = "terraform-test-tag"
5353
"terraform-test-category-02" = "terraform-test-tag-02"

examples/windows/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Following example contains the bare minimum options to be configured for the Win
1313
```hcl
1414
module "example-server-windowsvm-withdatadisk" {
1515
source = "Terraform-VMWare-Modules/vm/vsphere"
16-
version = "1.2.0"
16+
version = "Latest X.X.X"
1717
vmtemp = "TemplateName"
1818
instances = 1
1919
vmname = "example-server-windows"
@@ -32,7 +32,7 @@ module "example-server-windowsvm-withdatadisk" {
3232
```hcl
3333
module "example-server-windowsvm-advanced" {
3434
source = "Terraform-VMWare-Modules/vm/vsphere"
35-
version = "1.2.0"
35+
version = "Latest X.X.X"
3636
dc = "Datacenter"
3737
vmrp = "cluster/Resources"
3838
vmfolder = "Cattle"

examples/windows/main.tf

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Example of basic Windows VM
22
module "example-server-windowsvm-withdatadisk" {
33
source = "Terraform-VMWare-Modules/vm/vsphere"
4-
version = "1.1.0"
4+
version = "Latest X.X.X"
55
vmtemp = "TemplateName"
66
is_windows_image = "true"
77
instances = 1
@@ -36,7 +36,7 @@ module "example-server-windowsvm-withdatadisk" {
3636
//Example of Windows VM customization with advanced features
3737
module "example-server-windowsvm-advanced" {
3838
source = "Terraform-VMWare-Modules/vm/vsphere"
39-
version = "1.1.0"
39+
version = "Latest X.X.X"
4040
dc = "Datacenter"
4141
vmrp = "cluster/Resources"
4242
vmfolder = "Cattle"
@@ -56,18 +56,18 @@ module "example-server-windowsvm-advanced" {
5656
"VM Network" = ["192.168.0.4", ""] // Here the first instance will use Static Ip and Second DHCP
5757
"test" = ["", "192.168.0.3"]
5858
}
59-
disk_label = ["tpl-disk-1"]
60-
data_disk_label = ["label1", "label2"]
61-
scsi_type = "lsilogic" # "pvscsi"
62-
scsi_controller = 0
63-
data_disk_scsi_controller = [0, 3]
64-
disk_datastore = "vsanDatastore"
65-
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
66-
data_disk_size_gb = [10, 5] // Aditional Disks to be used
67-
thin_provisioned = ["true", "false"]
68-
vmdns = ["192.168.0.2", "192.168.0.1"]
69-
vmgateway = "192.168.0.1"
70-
network_type = ["vmxnet3", "vmxnet3"]
59+
disk_label = ["tpl-disk-1"]
60+
data_disk_label = ["label1", "label2"]
61+
scsi_type = "lsilogic" # "pvscsi"
62+
scsi_controller = 0
63+
data_disk_scsi_controller = [0, 3]
64+
disk_datastore = "vsanDatastore"
65+
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
66+
data_disk_size_gb = [10, 5] // Aditional Disks to be used
67+
thin_provisioned = ["true", "false"]
68+
vmdns = ["192.168.0.2", "192.168.0.1"]
69+
vmgateway = "192.168.0.1"
70+
network_type = ["vmxnet3", "vmxnet3"]
7171
tags = {
7272
"terraform-test-category" = "terraform-test-tag"
7373
"terraform-test-category-02" = "terraform-test-tag-02"

0 commit comments

Comments
 (0)