Add remote_npm config kind
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user