artifactapi module: plumb mirror_strategy on rpm/apk remotes #26

Merged
benvin merged 1 commits from benvin/mirror-strategy-config into main 2026-08-13 20:10:50 +10:00
Member

Why

Provider v0.5.1 adds a mirror_strategy attribute (round_robin | least_conn) on rpm/deb/alpine remote resources, controlling how upstream mirrors are picked across base_url + mirrorlist. #24 already plumbed mirrorlist through the module; this completes that mirror IaC surface by exposing mirror_strategy the same way, so remotes can declare a strategy from config.

How

  • modules/artifactapi/variables.tf: add mirror_strategy = optional(string, null) to the remote_rpm and remote_alpine object variables (alongside mirrorlist).
  • modules/artifactapi/main.tf: pass mirror_strategy = each.value.mirror_strategy through on artifactapi_remote_rpm and artifactapi_remote_alpine.
  • Provider constraint left at ~> 0.5 — already resolves v0.5.1 (which introduces the attribute); no floor bump needed.

Additive and optional; no config/remote_*/ changes (no real remote sets a strategy yet). tofu init resolves provider v0.5.1, tofu validate passes, tofu fmt clean.

## Why Provider v0.5.1 adds a `mirror_strategy` attribute (`round_robin` | `least_conn`) on rpm/deb/alpine remote resources, controlling how upstream mirrors are picked across `base_url` + `mirrorlist`. #24 already plumbed `mirrorlist` through the module; this completes that mirror IaC surface by exposing `mirror_strategy` the same way, so remotes can declare a strategy from config. ## How - `modules/artifactapi/variables.tf`: add `mirror_strategy = optional(string, null)` to the `remote_rpm` and `remote_alpine` object variables (alongside `mirrorlist`). - `modules/artifactapi/main.tf`: pass `mirror_strategy = each.value.mirror_strategy` through on `artifactapi_remote_rpm` and `artifactapi_remote_alpine`. - Provider constraint left at `~> 0.5` — already resolves v0.5.1 (which introduces the attribute); no floor bump needed. Additive and optional; no `config/remote_*/` changes (no real remote sets a strategy yet). `tofu init` resolves provider **v0.5.1**, `tofu validate` passes, `tofu fmt` clean.
unkin-agent added 1 commit 2026-08-13 20:06:38 +10:00
artifactapi module: plumb mirror_strategy on rpm/apk(alpine) remotes
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
b8ee0ed385
Expose the provider v0.5.1 mirror_strategy field through the config module
so rpm and alpine(apk) remotes can select how upstream mirrors are chosen
(round_robin | least_conn) across base_url + mirrorlist. Completes the
mirror IaC surface started in #24.

- remote_rpm / remote_alpine object vars gain mirror_strategy = optional(string, null)
- pass mirror_strategy through to the corresponding remote resources
- provider constraint stays ~> 0.5 (already resolves v0.5.1, which adds the attr)

Additive and optional; no real remote config changes.
benvin merged commit 2c3f52181a into main 2026-08-13 20:10:50 +10:00
benvin deleted branch benvin/mirror-strategy-config 2026-08-13 20:10:50 +10:00
Sign in to join this conversation.