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.
152 lines
4.2 KiB
Terraform
152 lines
4.2 KiB
Terraform
variable "remote_alpine" {
|
|
description = "Map of Alpine remote repositories"
|
|
type = map(object({
|
|
base_url = string
|
|
description = optional(string, "")
|
|
immutable_ttl = optional(number, 0)
|
|
mutable_ttl = optional(number, 7200)
|
|
immutable_patterns = optional(list(string), [])
|
|
mutable_patterns = optional(list(string), [])
|
|
stale_on_error = optional(bool, true)
|
|
mirrorlist = optional(list(string), [])
|
|
mirror_strategy = optional(string, null)
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "remote_docker" {
|
|
description = "Map of Docker remote repositories"
|
|
type = map(object({
|
|
base_url = string
|
|
description = optional(string, "")
|
|
immutable_ttl = optional(number, 0)
|
|
mutable_ttl = optional(number, 300)
|
|
patterns = optional(list(string), [])
|
|
mutable_patterns = optional(list(string), [])
|
|
stale_on_error = optional(bool, true)
|
|
ban_tags_enabled = optional(bool, false)
|
|
ban_tags = optional(list(string), [])
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "remote_generic" {
|
|
description = "Map of generic remote repositories"
|
|
type = map(object({
|
|
base_url = string
|
|
description = optional(string, "")
|
|
immutable_ttl = optional(number, 0)
|
|
mutable_ttl = optional(number, 7200)
|
|
patterns = optional(list(string), [])
|
|
mutable_patterns = optional(list(string), [])
|
|
stale_on_error = optional(bool, true)
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "remote_goproxy" {
|
|
description = "Map of Go module proxy remote repositories"
|
|
type = map(object({
|
|
base_url = string
|
|
description = optional(string, "")
|
|
immutable_ttl = optional(number, 0)
|
|
mutable_ttl = optional(number, 300)
|
|
stale_on_error = optional(bool, true)
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "remote_helm" {
|
|
description = "Map of Helm chart remote repositories"
|
|
type = map(object({
|
|
base_url = string
|
|
description = optional(string, "")
|
|
immutable_ttl = optional(number, 0)
|
|
mutable_ttl = optional(number, 3600)
|
|
check_mutable = optional(bool, true)
|
|
immutable_patterns = optional(list(string), [])
|
|
stale_on_error = optional(bool, true)
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "remote_rpm" {
|
|
description = "Map of RPM remote repositories"
|
|
type = map(object({
|
|
base_url = string
|
|
description = optional(string, "")
|
|
immutable_ttl = optional(number, 0)
|
|
mutable_ttl = optional(number, 7200)
|
|
immutable_patterns = optional(list(string), [])
|
|
mutable_patterns = optional(list(string), [])
|
|
stale_on_error = optional(bool, true)
|
|
mirrorlist = optional(list(string), [])
|
|
mirror_strategy = optional(string, null)
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "remote_pypi" {
|
|
description = "Map of PyPI remote repositories"
|
|
type = map(object({
|
|
base_url = string
|
|
description = optional(string, "")
|
|
immutable_ttl = optional(number, 0)
|
|
mutable_ttl = optional(number, 3600)
|
|
patterns = optional(list(string), [])
|
|
mutable_patterns = optional(list(string), [])
|
|
stale_on_error = optional(bool, true)
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "local_pypi" {
|
|
description = "Map of local PyPI repositories"
|
|
type = map(object({
|
|
description = optional(string, "")
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "local_rpm" {
|
|
description = "Map of local RPM repositories"
|
|
type = map(object({
|
|
description = optional(string, "")
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "local_generic" {
|
|
description = "Map of local generic (raw-file) repositories"
|
|
type = map(object({
|
|
description = optional(string, "")
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "local_terraform" {
|
|
description = "Map of local Terraform repositories"
|
|
type = map(object({
|
|
description = optional(string, "")
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "local_docker" {
|
|
description = "Map of local Docker repositories (real container registries)"
|
|
type = map(object({
|
|
description = optional(string, "")
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
variable "virtual" {
|
|
description = "Map of virtual repositories"
|
|
type = map(object({
|
|
package_type = string
|
|
description = optional(string, "")
|
|
members = list(string)
|
|
}))
|
|
default = {}
|
|
}
|