terraform/builtin/providers/vsphere
stack72 066eea4b35
provider/vsphere: Randomize the vsphere_virtual_disk acceptance test
```
% make testacc TEST=./builtin/providers/vsphere TESTARGS='-run=TestAccVSphereVirtualDisk_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/27 18:08:08 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/vsphere -v -run=TestAccVSphereVirtualDisk_ -timeout 120m
=== RUN   TestAccVSphereVirtualDisk_basic
--- PASS: TestAccVSphereVirtualDisk_basic (8.57s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/vsphere	8.591s
```
2017-03-27 18:09:12 +03:00
..
README.md
config.go
provider.go Don't require vsphere debug paths to be set (#7027) 2016-06-07 16:16:04 +01:00
provider_test.go
resource_vsphere_file.go vSphere file resource: extending functionality to copy files in vSphere 2016-08-04 13:49:28 -07:00
resource_vsphere_file_test.go vSphere file resource: extending functionality to copy files in vSphere 2016-08-04 13:49:28 -07:00
resource_vsphere_folder.go
resource_vsphere_folder_test.go
resource_vsphere_virtual_disk.go vSphere disks: read disk capacity instead of file size 2017-03-27 08:28:26 -04:00
resource_vsphere_virtual_disk_test.go provider/vsphere: Randomize the vsphere_virtual_disk acceptance test 2017-03-27 18:09:12 +03:00
resource_vsphere_virtual_machine.go Don't ignore VM power on errors. This prevents Terraform from hanging indefinitely for the VM to power on. (#11604) 2017-02-01 14:31:40 +00:00
resource_vsphere_virtual_machine_migrate.go provider/vsphere: Add migration for `enable_disk_uuid` on 2016-06-22 23:43:44 +01:00
resource_vsphere_virtual_machine_migrate_test.go provider/vsphere: Add migration for `enable_disk_uuid` on 2016-06-22 23:43:44 +01:00
resource_vsphere_virtual_machine_test.go Adding 'detach_unknown_disks_on_delete' flag for VM resource 2016-09-26 18:16:02 -07:00

README.md

Terraform vSphere Provider Dev Docs

This document is in place for developer documentation. User documentation is located HERE on Terraform's website.

Thank-you @tkak and Rakuten, Inc. for their original contribution of the source base used for this provider!

Introductory Documentation

Both README.md and BUILDING.md should be read first!

Base API Dependency ~ govmomi

This provider utilizes govmomi Go Library for communicating to VMware vSphere APIs (ESXi and/or vCenter). Because of the dependency this provider is compatible with VMware systems that are supported by govmomi. Much thanks to the dev team that maintains govmomi, and even more thanks to their guidance with the development of this provider. We have had many issues answered by the govmomi team!

vSphere CLI ~ govc

One of the great tools that govmomi contains is govc. It is a command line tool for using the govmomi API. Not only is it a tool to use, but also it's source base is a great resource of examples on how to exercise the API.

Required privileges for running Terraform as non-administrative user

Most of the organizations are concerned about administrative privileges. In order to use Terraform provider as non priviledged user, we can define a new Role within a vCenter and assign it appropriate privileges: Navigate to Administration -> Access Control -> Roles Click on "+" icon (Create role action), give it appropraite name and select following privileges:

  • Datastore

    • Allocate space
    • Browse datastore
    • Low level file operations
    • Remove file
    • Update virtual machine files
    • Update virtual machine metadata
  • Folder (all)

    • Create folder
    • Delete folder
    • Move folder
    • Rename folder
  • Network

    • Assign network
  • Resource

    • Apply recommendation
    • Assign virtual machine to resource pool
  • Virtual Machine

    • Configuration (all) - for now
    • Guest Operations (all) - for now
    • Interaction (all)
    • Inventory (all)
    • Provisioning (all)

These settings were tested with vSphere 6.0 and vSphere 5.5. For additional information on roles and permissions, please refer to official VMware documentation.

This section is a work in progress and additional contributions are more than welcome.