- add registry with per-file init() registration, sorted by type name
- give each remote kind its own resource_remote_<kind>.go
- replace hardcoded resource tables with registry/examples/docs invariants
- move per-resource README sections into docs/resources and docs/data-sources
Go toolchain steps (build, lint, test, pre-commit, package) now run
on artifactapi gobuilder:0.1.2-alma9 instead of golang:1.25 / the old
almalinux9-gobuilder:20260606 pin. Adds GOCACHEPROG env wiring each
step to the shared S3-backed build cache via go-cache-plugin.
The API stores mirror_strategy NOT NULL DEFAULT 'round_robin' and always
returns it on GET, so an Optional-only attribute (mapping empty->null on
read) put 'round_robin' into state while config was null, showing a
perpetual 'round_robin -> null' diff for every remote that did not set it.
- schema: mirror_strategy is now Optional+Computed with a round_robin
default, mirroring how the description attribute handles an
API-defaulted scalar; state can hold the API's round_robin with no diff
- apiToModel: pass the API value straight through, settling an empty
create-response to the round_robin default (no more empty->null)
- datasource: read the value through directly (drop the shared helper)
- tests: assert the GET-returns-round_robin refresh path yields no
post-apply diff, the empty create-response settles to the default, and
the schema attribute is Optional+Computed
Removed the now-unused stringOrNull helper.
The provider exposed mirrorlist but not mirror_strategy, so the API's
mirror load-balancing strategy (round_robin/least_conn) was unreachable
via Terraform. Add mirror_strategy the same way mirrorlist was added,
scoped to rpm/deb/alpine remotes.
- schema: optional string mirror_strategy on the remote resource
- ValidateConfig: reject on non-rpm/deb/alpine types and validate the
round_robin/least_conn enum at plan time
- wire model + modelToAPI/apiToModel (empty->null to avoid perpetual diff)
- datasource (computed) + README + rpm example
- unit tests: modelToAPI/apiToModel round-trip and ValidateConfig matrix
The mirrorlist ValidateConfig test imports terraform-plugin-go/tftypes
directly to build a tfsdk.Config, so `go mod tidy` moves it from an
indirect to a direct require. Commit the tidied go.mod so the CI
go-mod-tidy pre-commit hook is green.
Expose the artifactapi remotes API's new mirrorlist field so users can
configure extra upstream mirror base URLs. The API load-balances
base_url + mirrorlist with failover.
- Add optional mirrorlist list attribute to the remote resource schema
and the remote data source (read-only).
- Wire it end-to-end: TF model, wire model (json mirrorlist,omitempty),
modelToAPI/apiToModel, and preserve null/empty list semantics to avoid
plan churn.
- Scope to rpm/deb/alpine via ValidateConfig (plan-time error on other
remote types); API 400 is the backstop.
- Docs + rpm example; unit tests for round-trip, null handling, and the
type-scoping validation.
Adds the metadata-only Alpine/apk analog of the github_deb/github_rpm
remotes: exposes a GitHub repo's release .apk assets as an apk repository
(synthesized APKINDEX) without precaching, redirecting downloads to a
backing releases_remote.
- register newRemoteResource("github_alpine") in provider Resources()
- add NewRemoteGitHubAlpine convenience ctor
- extend provider/metadata/ctor table tests + bump resource count to 22
- document github_alpine remote type in README
- add examples/resources/artifactapi_remote_github_alpine/main.tf
Adds a local Alpine/apk repository resource mirroring the existing
artifactapi_local_deb and artifactapi_local_rpm locals, so Alpine
package registries can be managed directly via Terraform.
- add localAlpineResource (PackageType alpine, RepoType local) with
CRUD + import passthrough and model<->API mappers
- register NewLocalAlpineResource in provider Resources()
- bump provider_test resource count to 21 and expected type list
- add local unit tests and README/example entries
Add the metadata-only Debian/apt analog of artifactapi_remote_github_rpm,
exposing a GitHub repo's release .deb assets as a synthesized apt repository
with downloads redirected to a backing releases_remote.
- Register newRemoteResource("github_deb") and add NewRemoteGitHubDeb ctor
- Bump provider resource count 19 -> 20 and add the type name to test lists
- Add modelToAPI/metadata/constructor test coverage for github_deb
- Document github_deb in README and add an examples/ main.tf (goodtune/ghp)