Skip to content

Commit 0917fce

Browse files
author
Arman Keyoumarsi
committed
added example to CIDR support and changed vmfolder description
1 parent db63813 commit 0917fce

File tree

4 files changed

+36
-16
lines changed

4 files changed

+36
-16
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ This module is the work of many contributors. We appreciate your help!
145145

146146
To contribute, please read the [contribution guidelines](https://github.com/Terraform-VMWare-Modules/terraform-vsphere-vm/blob/master/CONTRIBUTING.md)
147147

148-
## Authors
149-
150-
Created by [Arman Keyoumarsi](https://github.com/Arman-Keyoumarsi)
151-
152148
## License
153149

154150
[MIT](LICENSE)

examples/example-linux-Network.tf

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// Example of Linux VM with more Advanced Features
22
module "example-server-linuxvm-advanced" {
3-
source = "Terraform-VMWare-Modules/vm/vsphere"
4-
version = "Latest X.X.X"
5-
dc = "Datacenter"
6-
vmrp = "cluster/Resources"
7-
vmfolder = "Cattle"
8-
datastore_cluster = "Datastore Cluster"
9-
vmtemp = "TemplateName"
10-
instances = 2
11-
vmname = "AdvancedVM"
12-
domain = "somedomain.com"
13-
ipv4submask = ["24", "8"]
3+
source = "Terraform-VMWare-Modules/vm/vsphere"
4+
version = "Latest X.X.X"
5+
dc = "Datacenter"
6+
vmrp = "cluster/Resources"
7+
vmfolder = "Cattle"
8+
datastore_cluster = "Datastore Cluster"
9+
vmtemp = "TemplateName"
10+
instances = 2
11+
vmname = "AdvancedVM"
12+
domain = "somedomain.com"
13+
ipv4submask = ["24", "8"]
1414
network = {
1515
"Network01" = ["10.13.113.2", "10.13.113.3"] # To use DHCP create Empty list ["",""]
1616
"Network02" = ["", ""] #Second Network will use the DHCP
@@ -21,3 +21,26 @@ module "example-server-linuxvm-advanced" {
2121
network_type = ["vmxnet3", "vmxnet3"]
2222
}
2323

24+
// Example of Linux VM with Network CIDR
25+
module "example-server-linuxvm-advanced" {
26+
source = "Terraform-VMWare-Modules/vm/vsphere"
27+
version = "Latest X.X.X"
28+
dc = "Datacenter"
29+
vmrp = "cluster/Resources"
30+
vmfolder = "Cattle"
31+
datastore_cluster = "Datastore Cluster"
32+
vmtemp = "TemplateName"
33+
instances = 2
34+
vmname = "AdvancedVM"
35+
domain = "somedomain.com"
36+
network = {
37+
"Network01" = ["10.13.113.2/28", "10.13.113.3/28"] # To use DHCP create Empty list ["",""]
38+
"Network02" = ["", ""] #Second Network will use the DHCP
39+
"Network03" = ["10.13.0.2/26", "10.13.0.3/26"]
40+
}
41+
disk_datastore = "vsanDatastore"
42+
dns_server_list = ["192.168.0.2", "192.168.0.1"]
43+
vmgateway = "192.168.0.1"
44+
network_type = ["vmxnet3", "vmxnet3"]
45+
}
46+

tests/sanity/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ module "example-server-basic" {
8282
memory_share_count = 2000
8383
cpu_share_level = "custom"
8484
cpu_share_count = 2000
85+
#ipv4submask = ["28", "26"]
8586
}
8687

8788
output "DC_ID" {

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ variable "vmrp" {
169169
}
170170

171171
variable "vmfolder" {
172-
description = "The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in."
172+
description = "The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in. Path - The absolute path of the folder. For example, given a default datacenter of default-dc, a folder of type vm, and a folder name of terraform-test-folder, the resulting path would be /default-dc/vm/terraform-test-folder."
173173
default = null
174174
}
175175

0 commit comments

Comments
 (0)