feat: add artifactapi_remote_github_rpm resource #13

Merged
benvin merged 1 commits from benvin/github-rpm-remote into main 2026-08-10 21:08:51 +10:00
Owner

Why

The artifactapi server gains a github_rpm remote type that exposes a GitHub repo's releases as a metadata-only yum repository (synthesized repodata, no precache, downloads redirected to a backend remote). Surface it through the provider so these remotes are declarable as code alongside the other remote types.

What

  • Register the github_rpm remote resource (artifactapi_remote_github_rpm), reusing the shared remoteResource plumbing; add the NewRemoteGitHubRPM constructor to match its siblings.
  • Generalize the releases_remote attribute description: it now names the backend remote that serves download bytes for both the terraform remote (URL rewriting) and the github_rpm remote (302 redirect of .rpm downloads).
  • Document the type in the README and add examples/resources/artifactapi_remote_github_rpm/main.tf wiring a github_rpm remote to a generic github.com releases_remote.

Tests

Resource metadata type name (artifactapi_remote_github_rpm), the NewRemoteGitHubRPM constructor, and mapping of package_type/base_url/releases_remote/patterns through the API model. The provider resource-count and expected-types assertions are updated. go build/vet/test green; terraform fmt clean.

Dependency / release

Depends on the github_rpm API surface in artifactapi (separate PR: unkin/artifactapi#107). The provider talks to the running server, so this can merge independently but only functions against a server that includes that PR. Cut a minor release (make minor) once merged, per the provider's tag-driven release convention.

## Why The artifactapi server gains a `github_rpm` remote type that exposes a GitHub repo's releases as a metadata-only yum repository (synthesized repodata, no precache, downloads redirected to a backend remote). Surface it through the provider so these remotes are declarable as code alongside the other remote types. ## What - Register the `github_rpm` remote resource (`artifactapi_remote_github_rpm`), reusing the shared `remoteResource` plumbing; add the `NewRemoteGitHubRPM` constructor to match its siblings. - Generalize the `releases_remote` attribute description: it now names the backend remote that serves download bytes for both the terraform remote (URL rewriting) and the `github_rpm` remote (302 redirect of `.rpm` downloads). - Document the type in the README and add `examples/resources/artifactapi_remote_github_rpm/main.tf` wiring a `github_rpm` remote to a generic `github.com` `releases_remote`. ## Tests Resource metadata type name (`artifactapi_remote_github_rpm`), the `NewRemoteGitHubRPM` constructor, and mapping of `package_type`/`base_url`/`releases_remote`/`patterns` through the API model. The provider resource-count and expected-types assertions are updated. `go build`/`vet`/`test` green; `terraform fmt` clean. ## Dependency / release Depends on the `github_rpm` API surface in **artifactapi** (separate PR: unkin/artifactapi#107). The provider talks to the running server, so this can merge independently but only functions against a server that includes that PR. Cut a **minor** release (`make minor`) once merged, per the provider's tag-driven release convention.
unkinben added 1 commit 2026-08-10 20:57:54 +10:00
feat: add artifactapi_remote_github_rpm resource
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
b26e651d45
The artifactapi server gains a github_rpm remote type that exposes a GitHub
repo's releases as a metadata-only yum repository (synthesized repodata, no
precache, downloads redirected to a backend remote). Surface it through the
provider so these remotes are declarable as code alongside the other types.

- Register the github_rpm remote resource (artifactapi_remote_github_rpm),
  reusing the shared remoteResource plumbing; add the NewRemoteGitHubRPM
  constructor to match its siblings.
- Generalize the releases_remote attribute description: it now names the
  backend remote that serves download bytes for both the terraform remote
  (URL rewriting) and the github_rpm remote (302 redirect of .rpm downloads).
- Document the type and add an example wiring a github_rpm remote to a generic
  github.com releases_remote.

Tests cover the resource metadata type name, the constructor, and mapping of
package_type/base_url/releases_remote/patterns through the API model; the
resource-count and expected-types assertions are updated.

Depends on the github_rpm API surface in artifactapi (separate PR). Cut a
minor release (make minor) once merged.
unkinben force-pushed benvin/github-rpm-remote from fc43ae1810 to b26e651d45 2026-08-10 20:57:54 +10:00 Compare
benvin merged commit 2d8584f103 into main 2026-08-10 21:08:51 +10:00
benvin deleted branch benvin/github-rpm-remote 2026-08-10 21:08:51 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/terraform-provider-artifactapi#13