feat: add local pypi/rpm repos, remote pypi, and virtual pypi
ci/woodpecker/pr/pre-commit Pipeline failed
ci/woodpecker/pr/plan Pipeline failed

Add terraform resources and configs for:
- artifactapi_local_pypi (pypi-internal)
- artifactapi_local_rpm (rpm-internal)
- artifactapi_local_terraform (terraform-unkin, was missing from module)
- artifactapi_remote_pypi (pypi.org upstream)
- artifactapi_virtual pypi merging pypi-internal + pypi remote

Wire up config.hcl, variables, and terragrunt inputs for all new types.
This commit is contained in:
2026-06-23 23:18:25 +10:00
parent 2b47de98c7
commit 828120eb13
9 changed files with 116 additions and 7 deletions
+20
View File
@@ -32,11 +32,31 @@ locals {
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_helm/")
}
remote_pypi = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_pypi/")
}
remote_rpm = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "remote_rpm/")
}
local_terraform = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "local_terraform/")
}
local_pypi = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "local_pypi/")
}
local_rpm = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
if startswith(file_path, "local_rpm/")
}
virtual = {
for file_path, content in local.all_configs :
trimsuffix(basename(file_path), ".yaml") => content
+1
View File
@@ -0,0 +1 @@
description: "Internal PyPI packages"
+1
View File
@@ -0,0 +1 @@
description: "Internal RPM packages"
@@ -0,0 +1 @@
description: "Unkin Terraform modules"
+5
View File
@@ -0,0 +1,5 @@
base_url: https://pypi.org
description: "PyPI — Python Package Index"
immutable_ttl: 0
mutable_ttl: 3600
stale_on_error: true
+5
View File
@@ -0,0 +1,5 @@
package_type: pypi
description: "Virtual PyPI repository merging internal packages and upstream PyPI"
members:
- pypi-internal
- pypi
+11 -7
View File
@@ -17,11 +17,15 @@ terraform {
}
inputs = {
remote_alpine = local.config.remote_alpine
remote_docker = local.config.remote_docker
remote_generic = local.config.remote_generic
remote_goproxy = local.config.remote_goproxy
remote_helm = local.config.remote_helm
remote_rpm = local.config.remote_rpm
virtual = local.config.virtual
remote_alpine = local.config.remote_alpine
remote_docker = local.config.remote_docker
remote_generic = local.config.remote_generic
remote_goproxy = local.config.remote_goproxy
remote_helm = local.config.remote_helm
remote_pypi = local.config.remote_pypi
remote_rpm = local.config.remote_rpm
local_terraform = local.config.local_terraform
local_pypi = local.config.local_pypi
local_rpm = local.config.local_rpm
virtual = local.config.virtual
}
+34
View File
@@ -76,6 +76,40 @@ resource "artifactapi_remote_rpm" "this" {
stale_on_error = each.value.stale_on_error
}
resource "artifactapi_remote_pypi" "this" {
for_each = var.remote_pypi
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_local_terraform" "this" {
for_each = var.local_terraform
name = each.key
description = each.value.description
}
resource "artifactapi_local_pypi" "this" {
for_each = var.local_pypi
name = each.key
description = each.value.description
}
resource "artifactapi_local_rpm" "this" {
for_each = var.local_rpm
name = each.key
description = each.value.description
}
resource "artifactapi_virtual" "this" {
for_each = var.virtual
+38
View File
@@ -82,6 +82,44 @@ variable "remote_rpm" {
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_terraform" {
description = "Map of local Terraform registry repositories"
type = map(object({
description = optional(string, "")
}))
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 "virtual" {
description = "Map of virtual repositories"
type = map(object({