Terraform Provider
- Website: https://www.terraform.io
- Mailing list: Google Groups
Requirements
Building The Provider
-
Clone repository
-
Change directory to repository root folder
-
Build the project by running
make build
$ make build
Using the provider
In order to use it in your computer, run install command inside the repository:
$ make install
You can find examples how to use the provider in _example directory
Contributing to the Provider
Code structure
- All code located under kubevirt directory
- Backend kubevirt client wrapper located in client
- All terraform schema definitions located under schema directory
- Terraform resource is defined (operations and schema) in
kubevirt/resource_*.go
for example: virtualmachine resource defined here - The main file, which define the provider's flags and structures is provider
Development Environment
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.14+ is required).
To compile the provider, run make build
. This will build the provider and put the provider binary in the repository root directory.
$ make build
In order to test the provider, you can simply run make test
.
$ make test
In order to run terraform on your computer with terraform-provider-kubevirt
, run make install
$ make install
That would build the binary and copy it to $(HOME)/.terraform.d/plugins/$(GOOS)_$(GOARCH)