diff --git a/examples/example-vmname.tf b/examples/example-vmname.tf index 76b2a14..228a341 100644 --- a/examples/example-vmname.tf +++ b/examples/example-vmname.tf @@ -54,16 +54,34 @@ module "example-server-multi" { # //Example of appending domain name to vm name -variable "domain" { - default = "somedomain.com" +module "example-server-fqdnvmname" { + source = "Terraform-VMWare-Modules/vm/vsphere" + version = "Latest X.X.X" + vmtemp = "TemplateName" + instances = 2 + vmname = "advancevm" + vmnameformat = "%03d" + domain = "somedomain.com" + fqdnvmname = true + vmrp = "esxi/Resources" + network = { + "Name of the Port Group in vSphere" = ["10.13.113.2", ""] + } + dc = "Datacenter" + datastore = "Data Store name(use datastore_cluster for datastore cluster)" } -module "example-server-multi" { +# Vmname Output -> advancevm001.somedomain.com, advancevm002.somedomain.com +# +//Example of using a starting number other than "1" for the vmname with multiple instances + +module "example-server-vmstartcount" { source = "Terraform-VMWare-Modules/vm/vsphere" version = "Latest X.X.X" vmtemp = "TemplateName" instances = 2 + vmstartcount = 5 vmname = "advancevm" - vmnameformat = "%03d.${var.domain}" + vmnameformat = "%03d" vmrp = "esxi/Resources" network = { "Name of the Port Group in vSphere" = ["10.13.113.2", ""] @@ -71,4 +89,5 @@ module "example-server-multi" { dc = "Datacenter" datastore = "Data Store name(use datastore_cluster for datastore cluster)" } -# Vmname Output -> advancevm001.somedomain.com, advancevm002dev.somedomain.com +# Vmname Output -> advancevm005, advancevm006 +