Merge pull request #13 from beatz174-bit/codex/update-markdown-guidance-for-local-development

docs: clarify dev_overrides validation loop without terraform init
This commit is contained in:
beatz174-bit
2026-04-23 13:17:07 +10:00
committed by GitHub
2 changed files with 41 additions and 2 deletions
+23
View File
@@ -56,3 +56,26 @@ Do not implement in this phase:
## Output expectations
Changes should keep the provider idiomatic, easy to contribute to, and ready for public/open-source usage.
## Agent instructions
### Local validation for this repository
This provider is not yet published to the Terraform Registry.
For local development, Terraform must use the locally built provider binary via `dev_overrides`. Because of that, `terraform init` is **not** part of the normal validation loop for agents working in this repository.
Use this loop instead:
```bash
go build -o terraform-provider-dynu
cd examples/read_only
terraform validate
terraform plan
```
If provider configuration or code changes, rebuild the binary before running Terraform again.
Do not infer that `terraform init` is required just because it is common in normal Terraform projects.
Leave GitHub Actions, CI workflows, and CI test behavior unchanged for this documentation guidance.
+18 -2
View File
@@ -35,7 +35,23 @@ terraform validate
terraform plan
```
> With `dev_overrides`, Terraform uses your local binary for `dynu/dynu`. `terraform init` is not the primary local-dev loop here and may still try registry/network operations.
> [!WARNING]
> Do not run `terraform init` as part of the normal Codex/local test loop for this repo. Because the provider is not yet published to the Terraform Registry, `init` may attempt registry/network resolution and fail or give misleading results. Use `dev_overrides`, rebuild the local binary, then run `terraform validate` and `terraform plan`.
>
> With `dev_overrides`, Terraform uses your local binary for `dynu/dynu`.
### Codex/local validation loop
Use this expected loop for local verification and Codex-driven validation:
```bash
go build -o terraform-provider-dynu
cd examples/read_only
terraform validate
terraform plan
```
When provider configuration or code changes, rebuild the provider binary first, then re-run `terraform validate` and `terraform plan`.
## Copy/paste starter configuration
@@ -163,7 +179,7 @@ data "dynu_dns_records" "selected" {
- **Stale provider binary after code changes**
- Symptom: Terraform behavior doesn't reflect latest code.
- Fix: rebuild binary (`go build -o terraform-provider-dynu`) and run `terraform plan` again.
- Fix: rebuild binary (`go build -o terraform-provider-dynu`) and re-run `terraform validate` and `terraform plan`.
## Developer workflow