Skip to content
nukosuke edited this page Apr 22, 2022 · 14 revisions

Looking for user document? It's available on Terraform registry.


Development

Manual testing

  1. Setup direnv and cd into examples/ directory.
  2. Copy .env.sample as .env and write your Zendesk credentials for authentication.
  3. Build provider code.
    # binary will be located into ./build/terraform-provider-zendesk_vx.y.z
    $ make install
    
  4. Create .tf file to test.
    # base provider config for development
    $ cp provider/dev_provider.tf main.tf
    
    # edit resources
    $ vim main.tf
    
  5. Exec terraform commands.
    $ TF_CLI_CONFIG_FILE=dev.tfrc terraform plan
    $ TF_CLI_CONFIG_FILE=dev.tfrc terraform apply
    
    • Don't forget to add TF_CLI_CONFIG_FILE=dev.tfrc to override provider search path with ./build.
    • If you always set the environment variable, add it to .env.

Generate docs/

go generate ./...

This command executes tfplugindocs and renders markdown files from schema Description and resources in examples/.