- A resource and a data source (
internal/provider/), - Examples (
examples/) and generated documentation (docs/), - Miscellaneous meta files.
Full, comprehensive documentation is available on the Terraform Registory. API documentation is also available for non-Terraform or service specific information.
- Clone the repository
- Enter the repository directory
- Build the provider using the
makecommand:
make updatespec # to update the spec using the latest version of the Zoom API
make generate # to generate the provider code from openapi spec and the documentation
make build # to build the providerThis 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 tidyThen commit the changes to go.mod and go.sum.
terraform {
required_providers {
zoom = {
source = "folio-sec/zoom"
version = "~> 0.0.0"
}
}
}
provider "zoom" {
account_id = var.zoom_account_id
client_id = var.zoom_client_id
client_secret = var.zoom_client_secret
}If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run make build. This will build the provider and put the provider binary in the dist/bin directory.
To generate or update documentation, run make 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.
Setup your zoom application from https://marketplace.zoom.us/user/build then get the secrets beforehand.
You can debug developing provider using following steps:
make local_install- Edit
~/.terraformrcusing the output comment cd examples/resources/zoom_phone_autoreceiptionistTF_LOG_PROVIDER=debug terraform apply
You can debug developing provider using following steps:
- Launch your Visual Studio Code app
- Select
Debug Terraform Provierconfiguration and start a debugging session from "Run and Debug" view - Copy a
TF_REATTACH_PROVIDERS={...}output from "Debug Console" tab cd examples/resources/zoom_phone_autoreceiptionistTF_REATTACH_PROVIDERS={...} TF_LOG_PROVIDER=debug terraform apply
We use release management by tagpr. When merging tagpr PR, next version would be released by github-actions.
See also CONTRIBUTING.md.
The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch.
The DCO requires a sign-off message in the following format appear on each commit in the pull request:
Signed-off-by: Sample Developer sample@example.comThe text can either be manually added to your commit body, or you can add either -s or --signoff to your usual git commit commands.
The following method is examples only and are not mandatory.
touch .git/hooks/prepare-commit-msg
chmod +x .git/hooks/prepare-commit-msgEdit the prepare-commit-msg file like:
#!/bin/sh
name=$(git config user.name)
email=$(git config user.email)
if [ -z "${name}" ]; then
echo "empty git config user.name"
exit 1
fi
if [ -z "${email}" ]; then
echo "empty git config user.email"
exit 1
fi
git interpret-trailers --if-exists doNothing --trailer \
"Signed-off-by: ${name} <${email}>" \
--in-place "$1"