artifactapi module: plumb mirror_strategy on rpm/apk remotes #26
Reference in New Issue
Block a user
Delete Branch "benvin/mirror-strategy-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Provider v0.5.1 adds a
mirror_strategyattribute (round_robin|least_conn) on rpm/deb/alpine remote resources, controlling how upstream mirrors are picked acrossbase_url+mirrorlist. #24 already plumbedmirrorlistthrough the module; this completes that mirror IaC surface by exposingmirror_strategythe same way, so remotes can declare a strategy from config.How
modules/artifactapi/variables.tf: addmirror_strategy = optional(string, null)to theremote_rpmandremote_alpineobject variables (alongsidemirrorlist).modules/artifactapi/main.tf: passmirror_strategy = each.value.mirror_strategythrough onartifactapi_remote_rpmandartifactapi_remote_alpine.~> 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 initresolves provider v0.5.1,tofu validatepasses,tofu fmtclean.