From 96aacb12aecf0c9850f0a1e09b49b4b976fe51a1 Mon Sep 17 00:00:00 2001 From: Phil Leggetter Date: Thu, 8 Aug 2024 09:45:51 +0100 Subject: [PATCH] chore(docs): add dev instructions to README --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index ca839a6..cebca92 100644 --- a/README.md +++ b/README.md @@ -53,3 +53,28 @@ resource "hookdeck_connection" "my_connection" { ## Dependencies This provider uses [Hookdeck API](https://hookdeck.com/api-ref) and [Hookdeck Go SDK](https://github.com/hookdeck/hookdeck-go-sdk) under the hood. + +## Development + +To test the provider during development, read the [HashiCorp providers plugin framework guide](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-provider). + +In short: + +1. Configure golang installation directory properly +2. Run `go build` +3. run “go install .” to build the terraform plugin executable file (do this every time code changes) +4. In “homedirectory/.terraformrc” point the hookdeck provider to a local installation + ``` + provider_installation { + + dev_overrides { + # often /Users//go/bin + "hookdeck/hookdeck" = "path/to/go/package/install/directory" + } + + # 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 {} + } + ```