File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,13 @@ When creating new resources:
42
42
43
43
### Running & Debugging the Provider
44
44
45
+ You can run the currently checked-out code for local testing and use it with Terraform.
46
+
45
47
Also see [ Terraform docs on debugging] ( https://developer.hashicorp.com/terraform/plugin/debugging#starting-a-provider-in-debug-mode ) .
46
48
47
49
Run the provider in debug mode and reattach the provider in Terraform:
48
50
* Launch ` main.go ` with the ` -debug ` flag from your IDE.
51
+ * Or launch it with ` go run main.go -debug ` from the command line.
49
52
* After launching, the provider will print an env var. Copy the printed ` TF_REATTACH_PROVIDERS='{…}' ` value.
50
53
* Export it in your shell where you run Terraform: ` export TF_REATTACH_PROVIDERS='{…}' ` .
51
54
* Terraform will now talk to your debug instance, and you can set breakpoints.
You can’t perform that action at this time.
0 commit comments