Skip to content

Commit d5bf829

Browse files
authored
(docs): update README.md
- correct spelling, punctuation, and grammar - apply `terraform fmt` - increase usage readability - trim trailing white space
1 parent a833107 commit d5bf829

File tree

1 file changed

+51
-45
lines changed

1 file changed

+51
-45
lines changed

README.md

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,97 +2,103 @@
22

33
![Terraform Version](https://img.shields.io/badge/Terraform-0.14-green.svg) [![TF Registry](https://img.shields.io/badge/terraform-registry-blue.svg)](https://registry.terraform.io/modules/Terraform-VMWare-Modules/vm/vsphere/) [![Changelog](https://img.shields.io/badge/changelog-release-green.svg)](https://github.com/Terraform-VMWare-Modules/terraform-vsphere-vm/releases) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
44

5-
For Virtual Machine Provisioning with (Linux/Windows) customization. Based on Terraform v0.13 and up, this module include most of the advance features that are available in resource `vsphere_virtual_machine`.
5+
For Virtual Machine Provisioning with (Linux/Windows) customization. Based on Terraform v0.13 and up, this module includes most of the advanced features available in resource `vsphere_virtual_machine`.
66

77
## Deploys (Single/Multiple) Virtual Machines to your vSphere environment
88

9-
This Terraform module deploys single or multiple virtual machines of type (Linux/Windows) with following features:
9+
This Terraform module deploys single or multiple virtual machines of type (Linux/Windows) with the following features:
1010

1111
- Ability to specify Linux or Windows VM customization.
1212
- Ability to add multiple network cards for the VM
1313
- Ability to assign tags and custom variables.
14-
- Ability to configure advance features for the vm.
14+
- Ability to configure advanced features for a VM.
1515
- Ability to deploy either a datastore or a datastore cluster.
1616
- Add extra data disk (up to 15) to the VM.
1717
- Different datastores for data disks (datastore_id).
18-
- Different storage policy for data disks (storage_policy_id).
18+
- Different storage policies for data disks (storage_policy_id).
1919
- Different scsi_controllers per disk, including data disks.
2020
- Ability to define depend on using variable vm_depends_on & tag_depends_on
2121

22-
> Note: For module to work it needs number of required variables corresponding to an existing resources in vSphere. Please refer to variable section for the list of required variables.
22+
> Note: For the module to work, it needs several required variables corresponding to existing resources in vSphere. Please refer to the variable section for the list of required variables.
2323
2424
## Getting started
2525

26-
Following example contains the bare minimum options to be configured for (Linux/Windows) VM deployment. You can choose between windows and linux customization by simply using the ´is_windows_image´ boolean switch.
26+
The following example contains the bare minimum options to be configured for (Linux/Windows) VM deployment. You can choose between Windows and Linux customization by simply using the `is_windows_image` boolean switch.
2727

28-
You can also download the entire module and use your own predefined variables to map your entire vSphere environment and use it within this module.
28+
You can also download the entire module and use your predefined variables to map your entire vSphere environment and use it within this module.
2929

30-
__Create a main.tf file and copy the following code. fill the required data and run terraform plan.__
30+
First, create a `main.tf` file.
3131

32-
```hcl
32+
Next, copy the code below and fill in the required variables.
3333

34+
```hcl
3435
# Configure the VMware vSphere Provider
3536
provider "vsphere" {
3637
user = "fill"
3738
password = "fill"
38-
vsphere_server = "fill"
39+
vsphere_server = "fill"
3940
4041
# if you have a self-signed cert
4142
allow_unverified_ssl = true
4243
}
4344
4445
# Deploy 2 linux VMs
4546
module "example-server-linuxvm" {
46-
source = "Terraform-VMWare-Modules/vm/vsphere"
47-
version = "X.X.X"
48-
vmtemp = "VM Template Name (Should Alrerady exist)"
49-
instances = 2
50-
vmname = "example-server-linux"
51-
vmrp = "esxi/Resources - or name of a resource pool"
47+
source = "Terraform-VMWare-Modules/vm/vsphere"
48+
version = "X.X.X"
49+
vmtemp = "VM Template Name (Should Alrerady exist)"
50+
instances = 2
51+
vmname = "example-server-linux"
52+
vmrp = "esxi/Resources - or name of a resource pool"
5253
network = {
5354
"Name of the Port Group in vSphere" = ["10.13.113.2", "10.13.113.3"] # To use DHCP create Empty list ["",""]
5455
}
55-
vmgateway = "10.13.113.1"
56+
vmgateway = "10.13.113.1"
5657
dc = "Datacenter"
5758
datastore = "Data Store name(use datastore_cluster for datastore cluster)"
5859
}
60+
```
61+
62+
Finally, run
5963

64+
```bash
65+
terraform run
6066
```
6167

62-
## Advance Usage
68+
## Advanced Usage
6369

64-
There are number of switches defined in the module, where you can use to enable different features for VM provisioning.
70+
The module includes several option switches, which you can use to enable various VM provisioning features.
6571

66-
- You can use `is_windows_image = true` to set the customization type to Windows (By default it is set to Linux customization)
67-
- You can use `windomain = "somedomain.com"` to join a windows server to AD domain.
72+
- You can use `is_windows_image = true` to set the customization type to Windows (By default, it is Linux customization)
73+
- You can use `windomain = "somedomain.com"` to join a Windows server to an AD domain.
6874
- Requires following additional variables
69-
- `domainuser` Domain account with necessary privileges to join a computer to the domain.
70-
- `domainpass` Domain user password.
75+
- `domainuser` - Domain account with necessary privileges to join a computer to the domain.
76+
- `domainpass` - Domain user password.
7177
- `is_windows_image` needs to be set to `true` to force the module to use Windows customization.
7278

73-
> Note: When deploying a windows server in WorkGroup, we recommend to keep the Local Admin password set to its default and change it later via an script. Unfortunately Terraform redeploy the entire server if you change the local admin password within your code.
79+
> Note: When deploying a windows server in WorkGroup, we recommend keeping the Local Admin password set to its default and change it later via a script. Unfortunately, Terraform will re-deploy the entire server if you change the local admin password.
7480
75-
Below is an example of windows deployment with some of the available feature sets. For complete list of available features please refer to [variable.tf](https://github.com/Terraform-VMWare-Modules/terraform-vsphere-vm/blob/master/variables.tf)
81+
Below is an example of windows deployment with some of the available feature sets. For a complete list of available features, please refer to [variable.tf](https://github.com/Terraform-VMWare-Modules/terraform-vsphere-vm/blob/master/variables.tf)
7682

7783
```hcl
7884
module "example-server-windowsvm-advanced" {
79-
source = "Terraform-VMWare-Modules/vm/vsphere"
80-
version = "X.X.X"
81-
dc = "Datacenter"
82-
vmrp = "cluster/Resources" #Works with ESXi/Resources
83-
vmfolder = "Cattle"
84-
datastore_cluster = "Datastore Cluster" #You can use datastore variable instead
85-
vmtemp = "TemplateName"
86-
instances = 2
87-
vmname = "AdvancedVM"
88-
vmnameformat = "%03d" #To use three decimal with leading zero vmnames will be AdvancedVM001,AdvancedVM002
89-
domain = "somedomain.com"
85+
source = "Terraform-VMWare-Modules/vm/vsphere"
86+
version = "X.X.X"
87+
dc = "Datacenter"
88+
vmrp = "cluster/Resources" #Works with ESXi/Resources
89+
vmfolder = "Cattle"
90+
datastore_cluster = "Datastore Cluster" #You can use datastore variable instead
91+
vmtemp = "TemplateName"
92+
instances = 2
93+
vmname = "AdvancedVM"
94+
vmnameformat = "%03d" #To use three decimal with leading zero vmnames will be AdvancedVM001,AdvancedVM002
95+
domain = "somedomain.com"
9096
network = {
9197
"Name of the Port Group in vSphere" = ["10.13.113.2", "10.13.113.3"] # To use DHCP create Empty list ["",""]
92-
"Second Network Card" = ["", ""]
98+
"Second Network Card" = ["", ""]
9399
}
94-
ipv4submask = ["24", "8"]
95-
network_type = ["vmxnet3", "vmxnet3"]
100+
ipv4submask = ["24", "8"]
101+
network_type = ["vmxnet3", "vmxnet3"]
96102
tags = {
97103
"terraform-test-category" = "terraform-test-tag"
98104
}
@@ -109,12 +115,12 @@ module "example-server-windowsvm-advanced" {
109115
datastore_id = "datastore-90679"
110116
}
111117
}
112-
scsi_bus_sharing = "physicalSharing" // The modes are physicalSharing, virtualSharing, and noSharing
113-
scsi_type = "lsilogic" // Other acceptable value "pvscsi"
114-
scsi_controller = 0 // This will assign OS disk to controller 0
115-
dns_server_list = ["192.168.0.2", "192.168.0.1"]
116-
vmgateway = "192.168.0.1"
118+
scsi_bus_sharing = "physicalSharing" // The modes are physicalSharing, virtualSharing, and noSharing
119+
scsi_type = "lsilogic" // Other acceptable value "pvscsi"
120+
scsi_controller = 0 // This will assign OS disk to controller 0
121+
dns_server_list = ["192.168.0.2", "192.168.0.1"]
117122
enable_disk_uuid = true
123+
vmgateway = "192.168.0.1"
118124
auto_logon = true
119125
run_once = ["command01", "command02"] // You can also run Powershell commands
120126
orgname = "Terraform-Module"
@@ -141,7 +147,7 @@ To contribute, please read the [contribution guidelines](https://github.com/Terr
141147

142148
## Authors
143149

144-
Originally created by [Arman Keyoumarsi](https://github.com/Arman-Keyoumarsi)
150+
Created by [Arman Keyoumarsi](https://github.com/Arman-Keyoumarsi)
145151

146152
## License
147153

0 commit comments

Comments
 (0)