You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- End Available Resources and Data Sources [operations] -->
64
71
65
-
### Testing the provider locally
72
+
<!-- Start Testing the provider locally [usage] -->
73
+
## Testing the provider locally
74
+
75
+
#### Local Provider
66
76
67
77
Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally.
68
78
69
79
This also allows for debuggers (e.g. delve) to be attached to the provider.
70
80
71
-
### Example
72
-
73
81
```sh
74
82
go run main.go --debug
75
83
# Copy the TF_REATTACH_PROVIDERS env var
@@ -78,7 +86,30 @@ cd examples/your-example
78
86
TF_REATTACH_PROVIDERS=... terraform init
79
87
TF_REATTACH_PROVIDERS=... terraform apply
80
88
```
81
-
<!-- End SDK Example Usage [usage] -->
89
+
90
+
#### Compiled Provider
91
+
92
+
Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods.
93
+
94
+
1. Execute `go build` to construct a binary called `terraform-provider-epilot-custom-variable`
95
+
2. Ensure that the `.terraformrc` file is configured with a `dev_overrides` section such that your local copy of terraform can see the provider binary
96
+
97
+
Terraform searches for the `.terraformrc` file in your home directory and applies any configuration settings you set.
0 commit comments