Skip to content

Commit

Permalink
provide examples for fqdnvmname & vmstartcount
Browse files Browse the repository at this point in the history
  • Loading branch information
damnsam committed Jun 15, 2023
1 parent c21de86 commit eb2ee10
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions examples/example-vmname.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,40 @@ 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", ""]
}
dc = "Datacenter"
datastore = "Data Store name(use datastore_cluster for datastore cluster)"
}
# Vmname Output -> advancevm001.somedomain.com, advancevm002dev.somedomain.com
# Vmname Output -> advancevm005, advancevm006

0 comments on commit eb2ee10

Please sign in to comment.