Skip to content

Commit

Permalink
added example to CIDR support and changed vmfolder description
Browse files Browse the repository at this point in the history
  • Loading branch information
Arman Keyoumarsi committed Aug 11, 2021
1 parent db63813 commit 0917fce
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 16 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ This module is the work of many contributors. We appreciate your help!

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

## Authors

Created by [Arman Keyoumarsi](https://github.com/Arman-Keyoumarsi)

## License

[MIT](LICENSE)
45 changes: 34 additions & 11 deletions examples/example-linux-Network.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Example of Linux VM with more Advanced Features
module "example-server-linuxvm-advanced" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
datastore_cluster = "Datastore Cluster"
vmtemp = "TemplateName"
instances = 2
vmname = "AdvancedVM"
domain = "somedomain.com"
ipv4submask = ["24", "8"]
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
datastore_cluster = "Datastore Cluster"
vmtemp = "TemplateName"
instances = 2
vmname = "AdvancedVM"
domain = "somedomain.com"
ipv4submask = ["24", "8"]
network = {
"Network01" = ["10.13.113.2", "10.13.113.3"] # To use DHCP create Empty list ["",""]
"Network02" = ["", ""] #Second Network will use the DHCP
Expand All @@ -21,3 +21,26 @@ module "example-server-linuxvm-advanced" {
network_type = ["vmxnet3", "vmxnet3"]
}

// Example of Linux VM with Network CIDR
module "example-server-linuxvm-advanced" {
source = "Terraform-VMWare-Modules/vm/vsphere"
version = "Latest X.X.X"
dc = "Datacenter"
vmrp = "cluster/Resources"
vmfolder = "Cattle"
datastore_cluster = "Datastore Cluster"
vmtemp = "TemplateName"
instances = 2
vmname = "AdvancedVM"
domain = "somedomain.com"
network = {
"Network01" = ["10.13.113.2/28", "10.13.113.3/28"] # To use DHCP create Empty list ["",""]
"Network02" = ["", ""] #Second Network will use the DHCP
"Network03" = ["10.13.0.2/26", "10.13.0.3/26"]
}
disk_datastore = "vsanDatastore"
dns_server_list = ["192.168.0.2", "192.168.0.1"]
vmgateway = "192.168.0.1"
network_type = ["vmxnet3", "vmxnet3"]
}

1 change: 1 addition & 0 deletions tests/sanity/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module "example-server-basic" {
memory_share_count = 2000
cpu_share_level = "custom"
cpu_share_count = 2000
#ipv4submask = ["28", "26"]
}

output "DC_ID" {
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ variable "vmrp" {
}

variable "vmfolder" {
description = "The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in."
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."
default = null
}

Expand Down

0 comments on commit 0917fce

Please sign in to comment.