Add remote_npm config kind
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful

This commit is contained in:
2026-10-09 19:30:17 +11:00
parent cf2d16268b
commit 35c7d1d224
4 changed files with 33 additions and 0 deletions
+5
View File
@@ -42,6 +42,11 @@ locals {
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_helm/")
}
remote_npm = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_npm/")
}
remote_pypi = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
@@ -24,6 +24,7 @@ inputs = {
remote_github_rpm = local.config.remote_github_rpm
remote_goproxy = local.config.remote_goproxy
remote_helm = local.config.remote_helm
remote_npm = local.config.remote_npm
remote_pypi = local.config.remote_pypi
remote_rpm = local.config.remote_rpm
local_terraform = local.config.local_terraform
+13
View File
@@ -108,6 +108,19 @@ resource "artifactapi_remote_github_deb" "this" {
depends_on = [artifactapi_remote_generic.this]
}
resource "artifactapi_remote_npm" "this" {
for_each = var.remote_npm
name = each.key
base_url = each.value.base_url
description = each.value.description
immutable_ttl = each.value.immutable_ttl
mutable_ttl = each.value.mutable_ttl
patterns = each.value.patterns
mutable_patterns = each.value.mutable_patterns
stale_on_error = each.value.stale_on_error
}
resource "artifactapi_remote_pypi" "this" {
for_each = var.remote_pypi
+14
View File
@@ -112,6 +112,20 @@ variable "remote_github_deb" {
default = {}
}
variable "remote_npm" {
description = "Map of npm 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 "remote_pypi" {
description = "Map of PyPI remote repositories"
type = map(object({