Terraform vSphere Provider Dev Docs
This document is in place for developer documentation. User documentation is located HERE on Terraform's website.
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:
- Allocate space
- Browse datastore
- Low level file operations
- Remove file
- Update virtual machine files
- Update virtual machine metadata
- Create folder
- Delete folder
- Move folder
- Rename folder
- Assign network
- Apply recommendation
- Assign virtual machine to resource pool
- Configuration (all) - for now
- Guest Operations (all) - for now
- Interaction (all)
- Inventory (all)
- Provisioning (all)
This section is a work in progress and additional contributions are more than welcome.
This section is empty.
Client() returns a new client for accessing VMWare vSphere.