resource_remote: add mirror_strategy attribute
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
This commit is contained in:
@@ -25,6 +25,10 @@ resource "artifactapi_remote_rpm" "almalinux" {
|
||||
"https://mirror.realcompute.io/almalinux",
|
||||
]
|
||||
|
||||
# Load-balancing strategy across base_url + mirrorlist:
|
||||
# "round_robin" (default) or "least_conn".
|
||||
mirror_strategy = "least_conn"
|
||||
|
||||
immutable_ttl = 0
|
||||
mutable_ttl = 7200
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user