From 243e5c84ebffce84400b47f3cb848cfc607392c5 Mon Sep 17 00:00:00 2001 From: Tommy Malmqvist Date: Sun, 24 Apr 2016 19:41:27 +0200 Subject: [PATCH] fixes-#6198-vsphere-provider-improve-documentation (#6200) * fixes-#6198-vsphere-provider-improve-documentation * Moved VMware cluster information to it's own example. * Fix #1 --- .../vsphere/r/virtual_machine.html.markdown | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/website/source/docs/providers/vsphere/r/virtual_machine.html.markdown b/website/source/docs/providers/vsphere/r/virtual_machine.html.markdown index 0593e3c9b4c6..87965428dcb4 100644 --- a/website/source/docs/providers/vsphere/r/virtual_machine.html.markdown +++ b/website/source/docs/providers/vsphere/r/virtual_machine.html.markdown @@ -29,6 +29,34 @@ resource "vsphere_virtual_machine" "web" { } ``` +## Example Usage VMware Cluster + +``` +resource "vsphere_virtual_machine" "lb" { + name = "lb01" + folder = "Loadbalancers" + vcpu = 2 + memory = 4096 + domain = "MYDOMAIN" + datacenter = "EAST" + cluster = "Production Cluster" + resource_pool = "Production Cluster/Resources/Production Servers" + + gateway = "10.20.30.254" + + network_interface { + label = "10_20_30_VMNet" + ipv4_address = "10.20.30.40" + ipv4_prefix_length = "24" + } + + disk { + datastore = "EAST/VMFS01-EAST" + template = "Templates/Centos7" + } +} +``` + ## Argument Reference The following arguments are supported: @@ -38,7 +66,7 @@ The following arguments are supported: * `memory` - (Required) The amount of RAM (in MB) to allocate to the virtual machine * `datacenter` - (Optional) The name of a Datacenter in which to launch the virtual machine * `cluster` - (Optional) Name of a Cluster in which to launch the virtual machine -* `resource_pool` (Optional) The name of a Resource Pool in which to launch the virtual machine +* `resource_pool` (Optional) The name of a Resource Pool in which to launch the virtual machine. Requires full path (see cluster example). * `gateway` - (Optional) Gateway IP address to use for all network interfaces * `domain` - (Optional) A FQDN for the virtual machine; defaults to "vsphere.local" * `time_zone` - (Optional) The [Linux](https://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/timezone.html) or [Windows](https://msdn.microsoft.com/en-us/library/ms912391.aspx) time zone to set on the virtual machine. Defaults to "Etc/UTC"