Example OpenTofu config for the hpe1810 provider
Run this once the switch is reachable again.
1. Build the provider
cd ../terraform-provider-hpe1810
go build -o terraform-provider-hpe1810 .
~/.tofurc already has a dev_overrides entry pointing at that directory, so tofu
picks up this locally-built binary instead of trying to fetch anything from a registry.
2. Plan
cd ../terraform # this directory
tofu plan
No tofu init needed (and it would fail anyway — local/joachimfriberg/hpe1810 isn't a
real registry source) since dev_overrides bypasses that step entirely.
You'll see a warning about dev overrides being in effect — that's expected during local development, not an error.
Files here
versions.tf—required_providersblock, points at the provider source name.provider.tf—provider "hpe1810"block; all fields optional (see comments for the env-var fallback chain).main.tf— the actual data source usage.outputs.tf— prints what came back.
Remember
- Only one login session to the switch at a time (see AGENT.md) — close the switch's web
UI in your browser before running
tofu plan. - Same proxy issue as the Python project: Go's
net/httpalso respectsHTTP_PROXY/NO_PROXY. If you getlogin request returned status 502, runexport NO_PROXY=192.168.2.10(orno_proxy=192.168.2.10) beforetofu plan.