Add remote_vcs config kind #73

Merged
benvin merged 4 commits from benvin/vcs into main 2026-10-24 18:34:12 +11:00
4 changed files with 33 additions and 0 deletions
+5
View File
@@ -77,6 +77,11 @@ locals {
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_rpm/")
}
remote_vcs = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_vcs/")
}
local_terraform = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
@@ -31,6 +31,7 @@ inputs = {
remote_puppet = local.config.remote_puppet
remote_pypi = local.config.remote_pypi
remote_rpm = local.config.remote_rpm
remote_vcs = local.config.remote_vcs
local_terraform = local.config.local_terraform
local_pypi = local.config.local_pypi
local_rpm = local.config.local_rpm
+13
View File
@@ -148,6 +148,19 @@ resource "artifactapi_remote_puppet" "this" {
stale_on_error = each.value.stale_on_error
}
resource "artifactapi_remote_vcs" "this" {
for_each = var.remote_vcs
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_ansible" "this" {
for_each = var.remote_ansible
+14
View File
@@ -155,6 +155,20 @@ variable "remote_puppet" {
default = {}
}
variable "remote_vcs" {
description = "Map of VCS (GitHub/Gitea archive and release) 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_ansible" {
description = "Map of Ansible Galaxy remote repositories"
type = map(object({