13 Commits

Author SHA1 Message Date
39c8cf0b58 Fix golangci-lint: formatting, nilerr false positive, deprecated linter names
Some checks failed
CI / build (push) Failing after 34s
- gofmt: fix struct field alignment in types.go, resource_server.go,
  data_source_ssh_keys_by_user.go
- nilerr: refactor GetAllPages pagination detection to avoid returning
  nil error when json.Unmarshal fails (intentional passthrough for
  non-paginated responses)
- .golangci.yml: replace deprecated linter names (vet -> govet,
  tenv -> usetesting)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 02:17:13 -04:00
ef8fbd530b Fix path injection, sensitive attribute exposure, and error body truncation
Some checks failed
Endpoint Sync Check / check-drift (push) Successful in 50s
CI / build (push) Failing after 1m26s
Security fixes from audit:

- Escape user-supplied strings (ext_relation_id, interface_name) with
  url.PathEscape before interpolating into API URL paths, preventing
  path traversal via crafted values like "../admin" or "foo/bar"
- Mark auth token URL attributes as Sensitive in both
  virtfusion_user_auth_token and virtfusion_user_server_auth_token
  resources, since the URL embeds the signed token
- Truncate raw API error response bodies to 500 bytes in error messages
  to prevent leaking sensitive data from verbose Laravel error responses

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 02:07:34 -04:00
6b7430b67b Overhaul VirtFusion provider: 20 resources, 30 data sources, multipage pagination
Complete rewrite of the VirtFusion Terraform provider with full API coverage:

- 20 managed resources (server, build, SSH key, user, firewall, IP blocks, etc.)
- 30 data sources (hypervisors, packages, servers, IP blocks, self-service, etc.)
- New HTTP client with proper error handling, query parameter support, and
  automatic multipage pagination via GetAllPages (fetches all pages from
  Laravel-style paginated endpoints and merges into a single response)
- Fixed type mismatches against live API: ServerData.Suspended (int→bool),
  IPBlockData.Type (string→int), PackageData json tags (primaryStorage, etc.),
  ServerData nested CPU/Settings/Resources structure, HypervisorGroupResources
  array response
- Configurable results-per-page (default 300) on all list data sources
- Migrated CI from GitHub Actions to Gitea Actions
- Updated goreleaser config, go.mod dependencies, and examples

Verified against live VirtFusion instance at cp.vps.ezscale.tech:
all data sources return correct data with full pagination support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 02:01:16 -04:00
689069921a v0.0.3 2023-10-24 11:54:34 -04:00
dfd2240fff Update Docs 2023-10-24 11:48:15 -04:00
ef06a879b8 Created SSH management 2023-10-24 11:30:16 -04:00
f0986d7d54 Updates 2023-10-22 19:11:13 -04:00
ff5d061fd2 Removed 2023-10-22 19:01:04 -04:00
456d32bca9 Created server build 2023-10-22 18:51:18 -04:00
afebefe635 updates 2023-10-22 15:13:01 -04:00
c3f4608db3 Updates 2023-10-22 15:03:08 -04:00
50eeba7961 Updates 2023-10-22 00:52:33 -04:00
Prophet731
5d5621266f Initial commit 2023-08-19 20:55:01 -04:00