Skip to content

Latest commit

 

History

History
75 lines (45 loc) · 2.87 KB

CONTRIBUTING.md

File metadata and controls

75 lines (45 loc) · 2.87 KB

Contributing to the provider

Thank you for your interest in contributing to the vSphere provider. We welcome your contributions. Here you'll find information to help you get started with provider development.

Documentation

Our provider development documentation provides a good start into developing an understanding of provider development. It's the best entry point if you are new to contributing to this provider.

To learn more about how to create issues and pull requests in this repository, and what happens after they are created, you may refer to the resources below:

Cloning the Project

First, you will want to clone the repository into your working directory:

git clone git@github.com:hashicorp/terraform-provider-vsphere

Running the Build

After the clone has been completed, you can enter the provider directory and build the provider.

cd terraform-provider-vsphere
make build

Installing the Local Plugin

After the build is complete, you can install the binary into your $GOPATH/bin folder with:

make install

Developing the Provider

NOTE: Before you start work on a feature, please make sure to check the issue tracker and existing pull requests to ensure that work is not being duplicated. For further clarification, you can also ask in a new issue.

If you wish to work on the provider, you'll first need Go installed on your machine.

See Building the Provider for details on building the provider.

Testing the Provider

NOTE: Testing the vSphere provider is currently a complex operation as it requires having a vCenter Server endpoint to test against, which should be hosting a standard configuration for a vSphere cluster. Some of the tests will work against ESXi, but YMMV.

Configuring Environment Variables

Most of the tests in this provider require a comprehensive list of environment variables to run. See the individual *_test.go files in the vsphere/ directory for more details.

Running the Acceptance Tests

After this is done, you can run the acceptance tests by running:

$ make testacc

If you want to run against a specific set of tests, run make testacc with the TESTARGS parameter containing the run mask as per below:

make testacc TESTARGS="-run=TestAccVSphereVirtualMachine"

This following example would run all of the acceptance tests matching TestAccVSphereVirtualMachine. Change this for the specific tests you want to run.