⚠️ Disclaimer: the project is still in the 0.x.x version, which means it’s still in the experimental phase.
Requirements
Building The Provider
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
install
command:
go install
Adding Dependencies
This provider uses Go modules.
Please see the Go documentation for the most up to date information about using Go modules.
To add a new dependency github.com/author/dependency
to your Terraform provider:
go get github.com/author/dependency
go mod tidy
Then commit the changes to go.mod
and go.sum
.
Using the Provider
Developing the Provider
Configure ~/.terraformrc
with the name of your provider and go
installation. For example:
provider_installation {
dev_overrides {
"qwilt.com/qwiltinc/qwilt" = "/path/to/binary/of/qwilt/provider"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
Set the local provider name in main.go:
providerName = "qwilt.com/qwiltinc/qwilt"
To compile the provider, run go install
. This will build the provider and put the provider binary in the $GOPATH/bin
directory.
To generate or update documentation, run go generate
.
In order to run the full suite of Acceptance tests, run make testacc
.
Note: Acceptance tests create real resources, and often cost money to run. Don'r run it on production environment.
make testacc