Skip to content

Commit

Permalink
Added Info to ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
Arman Keyoumarsi committed Jun 23, 2020
1 parent 1e489ab commit 3f43d1d
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 39 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ For Virtual Machine Provisioning with (Linux/Windows) customization. Thanks to t

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

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

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

> 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.
Expand All @@ -42,7 +38,7 @@ You can also download the entire module and use your own predefined variables to
```hcl
module "example-server-linuxvm" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.2.0"
version = "1.3.0"
vmtemp = "TemplateName"
instances = 1
vmname = "example-server-windows"
Expand Down Expand Up @@ -95,7 +91,7 @@ Below is an example of windows deployment with some of the available feature set
```hcl
module "example-server-windowsvm-advanced" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.2.0"
version = "1.3.0"
dc = "Datacenter"
vmrp = "cluster/Resources" #Works with ESXi/Resources
vmfolder = "Cattle"
Expand Down
4 changes: 2 additions & 2 deletions examples/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Following example contains the bare minimum options to be configured for the Lin
```hcl
module "example-server-linuxvm" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.2.0"
version = "Latest X.X.X"
vmtemp = "TemplateName"
instances = 1
vmname = "example-server-windows"
Expand All @@ -36,7 +36,7 @@ Below example will deploy 2 instance of a virtual machine from a linux template.
```hcl
module "example-server-linuxvm-withdatadisk" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.2.0"
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
Expand Down
57 changes: 57 additions & 0 deletions examples/linux/example-depend_on.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Simple Linux VM deployment
module "example-server-linuxvm" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "Latest X.X.X"
vmtemp = "TemplateName"
instances = 1
vmname = "example-server-windows"
vmrp = "esxi/Resources"
network_cards = ["Name of the Port Group in vSphere"]
ipv4 = {
"Name of the Port Group in vSphere" = ["10.0.0.1"] # To use DHCP create empty string for each instance
}
dc = "Datacenter"
datastore = "Data Store name(use ds_cluster for datastore cluster)"
}
// Example of Linux VM with more Advanced Features
module "example-server-linuxvm-advanced" {
source = "Terraform-VMWare-Modules/vm/vsphere"
vm_depends_on = [module.example-server-linuxvm] # This force the second module to wait for first VM to be created first
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
ds_cluster = "Datastore Cluster"
vmtemp = "TemplateName"
instances = 2
cpu_number = 2
ram_size = 2096
cpu_hot_add_enabled = "true"
cpu_hot_remove_enabled = "true"
memory_hot_add_enabled = "true"
vmname = "AdvancedVM"
vmdomain = "somedomain.com"
network_cards = ["VM Network", "test-network"]
ipv4submask = ["24", "8"]
ipv4 = {
"VM Network" = ["192.168.0.4", ""] // Here the first instance will use Static Ip and Second set to DHCP
"test" = ["", "192.168.0.3"]
}
disk_label = ["tpl-disk-1"]
data_disk_label = ["label1", "label2"]
scsi_type = "lsilogic" # "pvscsi"
scsi_controller = 0
data_disk_scsi_controller = [0, 1]
disk_datastore = "vsanDatastore"
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
data_disk_size_gb = [10, 5] // Aditional Disks to be used
thin_provisioned = ["true", "false"]
vmdns = ["192.168.0.2", "192.168.0.1"]
vmgateway = "192.168.0.1"
network_type = ["vmxnet3", "vmxnet3"]
tags = {
"terraform-test-category" = "terraform-test-tag"
"terraform-test-category-02" = "terraform-test-tag-02"
}
}

28 changes: 14 additions & 14 deletions examples/linux/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Simple Linux VM deployment
module "example-server-linuxvm" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.1.0"
version = "Latest X.X.X"
vmtemp = "TemplateName"
instances = 1
vmname = "example-server-windows"
Expand All @@ -16,7 +16,7 @@ module "example-server-linuxvm" {
// Example of Linux VM with more Advanced Features
module "example-server-linuxvm-advanced" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.1.0"
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
Expand All @@ -36,18 +36,18 @@ module "example-server-linuxvm-advanced" {
"VM Network" = ["192.168.0.4", ""] // Here the first instance will use Static Ip and Second set to DHCP
"test" = ["", "192.168.0.3"]
}
disk_label = ["tpl-disk-1"]
data_disk_label = ["label1", "label2"]
scsi_type = "lsilogic" # "pvscsi"
scsi_controller = 0
data_disk_scsi_controller = [0, 1]
disk_datastore = "vsanDatastore"
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
data_disk_size_gb = [10, 5] // Aditional Disks to be used
thin_provisioned = ["true", "false"]
vmdns = ["192.168.0.2", "192.168.0.1"]
vmgateway = "192.168.0.1"
network_type = ["vmxnet3", "vmxnet3"]
disk_label = ["tpl-disk-1"]
data_disk_label = ["label1", "label2"]
scsi_type = "lsilogic" # "pvscsi"
scsi_controller = 0
data_disk_scsi_controller = [0, 1]
disk_datastore = "vsanDatastore"
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
data_disk_size_gb = [10, 5] // Aditional Disks to be used
thin_provisioned = ["true", "false"]
vmdns = ["192.168.0.2", "192.168.0.1"]
vmgateway = "192.168.0.1"
network_type = ["vmxnet3", "vmxnet3"]
tags = {
"terraform-test-category" = "terraform-test-tag"
"terraform-test-category-02" = "terraform-test-tag-02"
Expand Down
4 changes: 2 additions & 2 deletions examples/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Following example contains the bare minimum options to be configured for the Win
```hcl
module "example-server-windowsvm-withdatadisk" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.2.0"
version = "Latest X.X.X"
vmtemp = "TemplateName"
instances = 1
vmname = "example-server-windows"
Expand All @@ -32,7 +32,7 @@ module "example-server-windowsvm-withdatadisk" {
```hcl
module "example-server-windowsvm-advanced" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.2.0"
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
Expand Down
28 changes: 14 additions & 14 deletions examples/windows/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Example of basic Windows VM
module "example-server-windowsvm-withdatadisk" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.1.0"
version = "Latest X.X.X"
vmtemp = "TemplateName"
is_windows_image = "true"
instances = 1
Expand Down Expand Up @@ -36,7 +36,7 @@ module "example-server-windowsvm-withdatadisk" {
//Example of Windows VM customization with advanced features
module "example-server-windowsvm-advanced" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "1.1.0"
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
Expand All @@ -56,18 +56,18 @@ module "example-server-windowsvm-advanced" {
"VM Network" = ["192.168.0.4", ""] // Here the first instance will use Static Ip and Second DHCP
"test" = ["", "192.168.0.3"]
}
disk_label = ["tpl-disk-1"]
data_disk_label = ["label1", "label2"]
scsi_type = "lsilogic" # "pvscsi"
scsi_controller = 0
data_disk_scsi_controller = [0, 3]
disk_datastore = "vsanDatastore"
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
data_disk_size_gb = [10, 5] // Aditional Disks to be used
thin_provisioned = ["true", "false"]
vmdns = ["192.168.0.2", "192.168.0.1"]
vmgateway = "192.168.0.1"
network_type = ["vmxnet3", "vmxnet3"]
disk_label = ["tpl-disk-1"]
data_disk_label = ["label1", "label2"]
scsi_type = "lsilogic" # "pvscsi"
scsi_controller = 0
data_disk_scsi_controller = [0, 3]
disk_datastore = "vsanDatastore"
data_disk_datastore = ["vsanDatastore", "nfsDatastore"]
data_disk_size_gb = [10, 5] // Aditional Disks to be used
thin_provisioned = ["true", "false"]
vmdns = ["192.168.0.2", "192.168.0.1"]
vmgateway = "192.168.0.1"
network_type = ["vmxnet3", "vmxnet3"]
tags = {
"terraform-test-category" = "terraform-test-tag"
"terraform-test-category-02" = "terraform-test-tag-02"
Expand Down

0 comments on commit 3f43d1d

Please sign in to comment.