diff --git a/README.md b/README.md index e9402e5..9062760 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/examples/example-linux-Network.tf b/examples/example-linux-Network.tf index 41e6f3c..7ff9935 100644 --- a/examples/example-linux-Network.tf +++ b/examples/example-linux-Network.tf @@ -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 @@ -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"] +} + diff --git a/tests/sanity/main.tf b/tests/sanity/main.tf index dff53af..0d1f2aa 100644 --- a/tests/sanity/main.tf +++ b/tests/sanity/main.tf @@ -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" { diff --git a/variables.tf b/variables.tf index 54cdf00..15b9c2d 100644 --- a/variables.tf +++ b/variables.tf @@ -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 }