This repository is built on the Terraform Plugin Framework.
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand:
go installSee docs directory
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
The Cudo API client is generated in the cudo-compute-market repo using the make tf command, copy the generated "compute" folder from cudo-compute-market/clients/go-grpc/ to terraform-provider-cudo/internal/.
To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.
To run locally add the code below to ~/.terraformrc
provider_installation {
dev_overrides {
"cudoventures/cudo" = "/home/<USER-DIR>/go/bin"
}
# 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 {}
}
The [Vercel terraform provider](https://github.com/vercel/terraform-provider-vercel) is a useful reference as it uses the same plugin framework.
To generate or update documentation, run make docs.
or to change the name:
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --rendered-provider-name Cudo
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.
make testaccTo make a release:
git tag v0.2.1
git push origin v0.2.1