Prepare for public release #38

Merged
benvin merged 3 commits from benvin/public-release-docs into main 2026-11-17 22:28:31 +11:00
113 changed files with 2182 additions and 1288 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 IUCLabs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+5 -2
View File
@@ -1,10 +1,10 @@
.PHONY: build install test lint fmt clean tidy patch minor major package
.PHONY: build install test lint fmt clean tidy patch minor major package docs
BINARY := terraform-provider-artifactapi
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "0.0.0-dev")
OS_ARCH := linux_amd64
INSTALL_VERSION := $(shell echo $(VERSION) | sed 's/^v//')
INSTALL_DIR := ~/.terraform.d/plugins/git.unkin.net/unkin/artifactapi/$(INSTALL_VERSION)/$(OS_ARCH)
INSTALL_DIR := ~/.terraform.d/plugins/registry.terraform.io/iuclabs/artifactapi/$(INSTALL_VERSION)/$(OS_ARCH)
ZIP := $(BINARY)_$(INSTALL_VERSION)_$(OS_ARCH).zip
GO_VERSION_REQUIRED := 1.23
@@ -39,6 +39,9 @@ package: build
clean:
rm -f $(BINARY) *.zip
docs:
go generate ./...
tidy:
go mod tidy
+35 -51
View File
@@ -1,75 +1,59 @@
# terraform-provider-artifactapi
# Terraform Provider ArtifactAPI
Terraform provider for managing [ArtifactAPI](https://git.unkin.net/unkin/artifactapi) remotes and virtual repositories.
The ArtifactAPI provider manages repositories on an ArtifactAPI server: local
repositories that host packages directly, remotes that cache an upstream
(Docker, Helm, PyPI, npm, RPM, Deb, Alpine, Go, Terraform, GitHub releases and
more), and virtual repositories that merge several remotes behind one endpoint.
It works with Terraform and OpenTofu.
## Requirements
- Go >= 1.23
- Terraform >= 1.0
## Building
```sh
make build
```
## Installation
Install the provider to your local Terraform plugin directory:
```sh
make install
```
This places the binary at `~/.terraform.d/plugins/git.unkin.net/unkin/artifactapi/<version>/<os_arch>/`.
A `make install` build is referenced with `source = "git.unkin.net/unkin/artifactapi"` (the provider address, matching that path); the `artifactapi.example.com/terraform-unkin/artifactapi` source below is for installing from an artifactapi registry.
## Provider Configuration
## Quick start
```hcl
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
source = "IUCLabs/artifactapi"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
token = var.artifactapi_token # optional
# token defaults to the ARTIFACTAPI_TOKEN environment variable
}
resource "artifactapi_remote_docker" "dockerhub" {
name = "dockerhub"
base_url = "https://registry-1.docker.io"
mutable_ttl = 300
}
resource "artifactapi_local_rpm" "internal" {
name = "rpm-internal"
}
```
| Attribute | Required | Description |
|------------|----------|------------------------------------------------------------------------------|
| `endpoint` | Yes | ArtifactAPI server endpoint URL |
| `token` | No | Bearer token sent as `Authorization` header; falls back to `ARTIFACTAPI_TOKEN` |
All resources can be imported by name, e.g.
`terraform import artifactapi_remote_docker.dockerhub dockerhub`.
## Resources and Data Sources
## Requirements
Each resource is documented in [`docs/resources/`](docs/resources/) and each data
source in [`docs/data-sources/`](docs/data-sources/), with a matching example under
[`examples/`](examples/).
- [Terraform](https://developer.hashicorp.com/terraform/downloads) >= 1.0 or [OpenTofu](https://opentofu.org) >= 1.6
- [Go](https://go.dev/doc/install) >= 1.25 (to build the provider)
## Import
Resources can be imported by name:
## Building
```sh
terraform import artifactapi_remote_docker.dockerhub dockerhub
terraform import artifactapi_virtual.helm helm
make build
make test
make docs # regenerate docs/ from the schema and examples/
```
## Development
## Documentation
```sh
make build # Build the provider binary
make install # Install to local plugin directory
make test # Run tests
make lint # Run go vet
make fmt # Format code
make clean # Remove binary
```
See [`docs/`](docs/index.md) for the provider, resource and data source
reference, and [`examples/`](examples/) for usage.
## License
[MIT](LICENSE)
+59 -3
View File
@@ -1,9 +1,65 @@
# `artifactapi_remote` (Data Source)
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote Data Source - artifactapi"
subcategory: ""
description: |-
Read an existing ArtifactAPI remote.
---
Read an existing remote's configuration.
# artifactapi_remote (Data Source)
```hcl
Read an existing ArtifactAPI remote.
## Example Usage
```terraform
# Read the configuration of an existing remote by name.
# All fields (base_url, package_type, TTLs, patterns, etc.) are available
# as computed attributes.
data "artifactapi_remote" "dockerhub" {
name = "dockerhub"
}
output "dockerhub_base_url" {
value = data.artifactapi_remote.dockerhub.base_url
}
output "dockerhub_package_type" {
value = data.artifactapi_remote.dockerhub.package_type
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Name of the remote to read.
### Read-Only
- `ban_tags` (List of String) Banned tags (docker only).
- `ban_tags_enabled` (Boolean) Whether tag banning is enabled (docker only).
- `base_url` (String) Upstream repository base URL.
- `blocklist` (List of String) Paths that are always denied.
- `cache_repodata` (Boolean) Whether generated repodata is cached (github_rpm only).
- `check_mutable` (Boolean) Whether mutable artifacts are conditionally revalidated.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Paths forced to be treated as immutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `managed_by` (String) What manages the repository (e.g. terraform).
- `mirror_strategy` (String) Mirror load-balancing strategy: round_robin or least_conn.
- `mirrorlist` (List of String) Extra upstream mirror base URLs (rpm/deb/alpine only).
- `mutable_patterns` (List of String) Paths forced to be treated as mutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `package_type` (String) Package type of the repository (e.g. docker, helm, rpm).
- `patterns` (List of String) Allowlist of paths to proxy (empty = all).
- `quarantine_days` (Number) Days new artifacts are quarantined.
- `quarantine_enabled` (Boolean) Whether newly published upstream artifacts are quarantined.
- `releases_remote` (String) Name of the backend remote that serves download bytes.
- `serve_stale` (Boolean) Whether rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Whether stale cached content is served when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds (github_rpm/github_deb/github_alpine only).
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
+38 -3
View File
@@ -1,9 +1,44 @@
# `artifactapi_virtual` (Data Source)
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_virtual Data Source - artifactapi"
subcategory: ""
description: |-
Read an existing ArtifactAPI virtual repository.
---
Read an existing virtual repository's configuration.
# artifactapi_virtual (Data Source)
```hcl
Read an existing ArtifactAPI virtual repository.
## Example Usage
```terraform
# Read the configuration of an existing virtual repository by name.
# Returns the package type, description, and ordered member list.
data "artifactapi_virtual" "helm" {
name = "helm"
}
output "helm_members" {
value = data.artifactapi_virtual.helm.members
}
output "helm_package_type" {
value = data.artifactapi_virtual.helm.package_type
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Virtual repository name.
### Read-Only
- `description` (String) Human-readable description.
- `managed_by` (String) What manages the repository (e.g. terraform).
- `members` (List of String) Ordered list of member remote names.
- `package_type` (String) Package type of the virtual repository.
- `parallel_fetch` (Boolean) Whether member index files are fetched concurrently.
+38
View File
@@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi Provider"
description: |-
Manage ArtifactAPI local, remote and virtual repositories.
---
# artifactapi Provider
Manage ArtifactAPI local, remote and virtual repositories.
## Example Usage
```terraform
terraform {
required_providers {
artifactapi = {
source = "IUCLabs/artifactapi"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
# token defaults to the ARTIFACTAPI_TOKEN environment variable
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `endpoint` (String) The ArtifactAPI server endpoint URL (e.g. https://artifactapi.example.com).
### Optional
- `token` (String, Sensitive) Bearer token sent as the Authorization header. Falls back to the ARTIFACTAPI_TOKEN environment variable.
+38 -7
View File
@@ -1,11 +1,42 @@
# `artifactapi_local_alpine`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_alpine Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI Alpine repository for hosting Alpine/apk packages directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_alpine (Resource)
Each takes just `name` (required, forces replacement) and an optional
`description`.
Manages a local ArtifactAPI Alpine repository for hosting Alpine/apk packages directly.
## Example
## Example Usage
See `examples/resources/artifactapi_local_alpine/main.tf`.
```terraform
resource "artifactapi_local_alpine" "internal" {
name = "alpine-internal"
description = "Internal Alpine package repository"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local Alpine repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_alpine.internal alpine-internal
```
+37 -8
View File
@@ -1,13 +1,42 @@
# `artifactapi_local_ansible`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_ansible Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI Ansible Galaxy repository for hosting collections directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_ansible (Resource)
A Galaxy v3 server for collections (`ansible-galaxy collection publish` and `install`).
Manages a local ArtifactAPI Ansible Galaxy repository for hosting collections directly.
Each takes just `name` (required, forces replacement) and an optional
`description`.
## Example Usage
## Example
```terraform
resource "artifactapi_local_ansible" "internal" {
name = "ansible-internal"
description = "Internal Ansible Galaxy collections"
}
```
See `examples/resources/artifactapi_local_ansible/main.tf`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local ansible repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_ansible.internal ansible-internal
```
+38 -7
View File
@@ -1,11 +1,42 @@
# `artifactapi_local_deb`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_deb Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI Deb repository for hosting Debian/apt packages directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_deb (Resource)
Each takes just `name` (required, forces replacement) and an optional
`description`.
Manages a local ArtifactAPI Deb repository for hosting Debian/apt packages directly.
## Example
## Example Usage
See `examples/resources/artifactapi_local_deb/main.tf`.
```terraform
resource "artifactapi_local_deb" "internal" {
name = "deb-internal"
description = "Internal Deb package repository"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local Deb repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_deb.internal deb-internal
```
+32 -11
View File
@@ -1,21 +1,42 @@
# `artifactapi_local_docker`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_docker Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI Docker repository — a real container registry serving the Docker Registry HTTP API V2 for push and pull.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_docker (Resource)
A container registry (Docker Registry HTTP API V2, push and pull).
Manages a local ArtifactAPI Docker repository — a real container registry serving the Docker Registry HTTP API V2 for push and pull.
Each takes just `name` (required, forces replacement) and an optional
`description`.
## Example Usage
## Example
```hcl
```terraform
resource "artifactapi_local_docker" "internal" {
name = "docker-internal"
description = "Internal container image registry"
}
```
Images push and pull against `<endpoint>/<name>/<image>:<tag>`, e.g.
`docker push artifactapi.example.com/docker-internal/myapp:latest`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local Docker repository. Becomes the first path segment of pushed image references (e.g. <endpoint>/<name>/<image>:<tag>).
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_docker.internal docker-internal
```
+37 -8
View File
@@ -1,13 +1,42 @@
# `artifactapi_local_gems`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_gems Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI RubyGems repository for hosting gems directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_gems (Resource)
A RubyGems source (`gem push`, `gem yank`, `gem install` and `bundle install`).
Manages a local ArtifactAPI RubyGems repository for hosting gems directly.
Each takes just `name` (required, forces replacement) and an optional
`description`.
## Example Usage
## Example
```terraform
resource "artifactapi_local_gems" "internal" {
name = "gems-internal"
description = "Internal RubyGems repository"
}
```
See `examples/resources/artifactapi_local_gems/main.tf`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local gems repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_gems.internal gems-internal
```
+38 -7
View File
@@ -1,11 +1,42 @@
# `artifactapi_local_generic`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_generic Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI generic repository for hosting arbitrary files (e.g. rootfs tarballs).
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_generic (Resource)
Each takes just `name` (required, forces replacement) and an optional
`description`.
Manages a local ArtifactAPI generic repository for hosting arbitrary files (e.g. rootfs tarballs).
## Example
## Example Usage
See `examples/resources/artifactapi_local_generic/main.tf`.
```terraform
resource "artifactapi_local_generic" "rootfs_images" {
name = "rootfs-images"
description = "Prebuilt node rootfs tarballs (bootapi image provisioning)"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local Generic repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_generic.rootfs_images rootfs-images
```
+37 -8
View File
@@ -1,13 +1,42 @@
# `artifactapi_local_goproxy`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_goproxy Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI Go module proxy for hosting private Go modules directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_goproxy (Resource)
A Go module proxy for private modules (GOPROXY protocol: `go get`, `go mod download`).
Manages a local ArtifactAPI Go module proxy for hosting private Go modules directly.
Each takes just `name` (required, forces replacement) and an optional
`description`.
## Example Usage
## Example
```terraform
resource "artifactapi_local_goproxy" "internal" {
name = "go-internal"
description = "Internal Go module proxy"
}
```
See `examples/resources/artifactapi_local_goproxy/main.tf`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local Go module proxy.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_goproxy.internal go-internal
```
+37 -8
View File
@@ -1,13 +1,42 @@
# `artifactapi_local_helm`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_helm Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI Helm repository for hosting Helm charts directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_helm (Resource)
A chart repository (index.yaml generated from uploaded charts).
Manages a local ArtifactAPI Helm repository for hosting Helm charts directly.
Each takes just `name` (required, forces replacement) and an optional
`description`.
## Example Usage
## Example
```terraform
resource "artifactapi_local_helm" "internal" {
name = "helm-internal"
description = "Internal Helm chart repository"
}
```
See `examples/resources/artifactapi_local_helm/main.tf`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local Helm repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_helm.internal helm-internal
```
+37 -8
View File
@@ -1,13 +1,42 @@
# `artifactapi_local_npm`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_npm Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI NPM repository for hosting npm packages directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_npm (Resource)
An npm registry (`npm publish` and `npm install`).
Manages a local ArtifactAPI NPM repository for hosting npm packages directly.
Each takes just `name` (required, forces replacement) and an optional
`description`.
## Example Usage
## Example
```terraform
resource "artifactapi_local_npm" "internal" {
name = "npm-internal"
description = "Internal npm package registry"
}
```
See `examples/resources/artifactapi_local_npm/main.tf`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local NPM repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_npm.internal npm-internal
```
+37 -8
View File
@@ -1,13 +1,42 @@
# `artifactapi_local_puppet`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_puppet Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI Puppet Forge for hosting Puppet modules directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_puppet (Resource)
A Puppet Forge (v3 API) serving uploaded modules to `puppet module install` and r10k.
Manages a local ArtifactAPI Puppet Forge for hosting Puppet modules directly.
Each takes just `name` (required, forces replacement) and an optional
`description`.
## Example Usage
## Example
```terraform
resource "artifactapi_local_puppet" "internal" {
name = "puppet-internal"
description = "Internal Puppet Forge"
}
```
See `examples/resources/artifactapi_local_puppet/main.tf`.
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local Puppet Forge.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_puppet.internal puppet-internal
```
+38 -7
View File
@@ -1,11 +1,42 @@
# `artifactapi_local_pypi`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_pypi Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI PyPI repository for hosting Python packages directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_pypi (Resource)
Each takes just `name` (required, forces replacement) and an optional
`description`.
Manages a local ArtifactAPI PyPI repository for hosting Python packages directly.
## Example
## Example Usage
See `examples/resources/artifactapi_local_pypi/main.tf`.
```terraform
resource "artifactapi_local_pypi" "internal" {
name = "pypi-internal"
description = "Internal PyPI package registry"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local PyPI repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_pypi.internal pypi-internal
```
+38 -7
View File
@@ -1,11 +1,42 @@
# `artifactapi_local_rpm`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_rpm Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI RPM repository for hosting RPM packages directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_rpm (Resource)
Each takes just `name` (required, forces replacement) and an optional
`description`.
Manages a local ArtifactAPI RPM repository for hosting RPM packages directly.
## Example
## Example Usage
See `examples/resources/artifactapi_local_rpm/main.tf`.
```terraform
resource "artifactapi_local_rpm" "internal" {
name = "rpm-internal"
description = "Internal RPM package repository"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local RPM repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_rpm.internal rpm-internal
```
+38 -7
View File
@@ -1,11 +1,42 @@
# `artifactapi_local_terraform`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_local_terraform Resource - artifactapi"
subcategory: ""
description: |-
Manages a local ArtifactAPI terraform registry for hosting providers directly.
---
Local resources manage repositories that ArtifactAPI hosts directly (rather than
proxying an upstream) — each is a real registry for its package type.
# artifactapi_local_terraform (Resource)
Each takes just `name` (required, forces replacement) and an optional
`description`.
Manages a local ArtifactAPI terraform registry for hosting providers directly.
## Example
## Example Usage
See `examples/resources/artifactapi_local_terraform/main.tf`.
```terraform
resource "artifactapi_local_terraform" "internal" {
name = "tf-internal"
description = "Internal terraform provider registry"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Unique name of the local terraform repository.
### Optional
- `description` (String) Human-readable description.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_local_terraform.internal tf-internal
```
+63 -45
View File
@@ -1,54 +1,72 @@
# `artifactapi_remote_alpine`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_alpine Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI alpine remote, a caching proxy for an upstream repository. Supports mirrorlist and mirror_strategy.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_alpine (Resource)
## Common Attributes
Manages an ArtifactAPI alpine remote, a caching proxy for an upstream repository. Supports `mirrorlist` and `mirror_strategy`.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## rpm / deb / alpine-specific Attributes
```terraform
# Alpine remote proxies an Alpine Linux APK repository.
# The provider knows APKINDEX.tar.gz is mutable; .apk packages are immutable.
resource "artifactapi_remote_alpine" "alpine" {
name = "alpine"
base_url = "https://dl-cdn.alpinelinux.org"
description = "Alpine Linux APK package repository"
| Attribute | Default | Description |
|-------------------|---------------|-------------------------------------------------------------------------------------------------|
| `mirrorlist` | | Extra upstream mirror base URLs. Requests are load-balanced with failover across `base_url` + `mirrorlist`. |
| `mirror_strategy` | `round_robin` | Mirror load-balancing strategy across `base_url` + `mirrorlist`. One of `round_robin` or `least_conn`. |
Only valid on the `artifactapi_remote_rpm`, `artifactapi_remote_deb`, and
`artifactapi_remote_alpine` resources. Setting either on any other remote type is
rejected at plan time.
```hcl
resource "artifactapi_remote_rpm" "epel" {
name = "epel-9"
base_url = "https://download.example.com/pub/epel/9/Everything/x86_64"
mirrorlist = [
"https://mirror-a.example.net/epel/9/Everything/x86_64",
"https://mirror-b.example.org/epel/9/Everything/x86_64",
]
mirror_strategy = "least_conn"
immutable_ttl = 0
mutable_ttl = 7200
}
```
## Example
<!-- schema generated by tfplugindocs -->
## Schema
See `examples/resources/artifactapi_remote_alpine/main.tf`.
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_alpine.alpine alpine
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_ansible`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_ansible Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI ansible remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_ansible (Resource)
## Common Attributes
Manages an ArtifactAPI ansible remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# Ansible remote proxies the Galaxy v3 collections API.
# The provider knows JSON metadata is mutable; collection tarballs are immutable.
resource "artifactapi_remote_ansible" "galaxy" {
name = "galaxy"
base_url = "https://galaxy.ansible.com"
description = "Ansible Galaxy"
See `examples/resources/artifactapi_remote_ansible/main.tf`.
immutable_ttl = 0
mutable_ttl = 300
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_ansible.galaxy galaxy
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_cargo`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_cargo Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI cargo remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_cargo (Resource)
## Common Attributes
Manages an ArtifactAPI cargo remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# Cargo remote proxies a crates.io sparse registry.
# The provider knows index files are mutable; .crate downloads are immutable.
resource "artifactapi_remote_cargo" "crates_io" {
name = "crates-io"
base_url = "https://index.crates.io"
description = "crates.io sparse registry"
See `examples/resources/artifactapi_remote_cargo/main.tf`.
immutable_ttl = 0
mutable_ttl = 300
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_cargo.crates_io crates-io
```
+63 -45
View File
@@ -1,54 +1,72 @@
# `artifactapi_remote_deb`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_deb Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI deb remote, a caching proxy for an upstream repository. Supports mirrorlist and mirror_strategy.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_deb (Resource)
## Common Attributes
Manages an ArtifactAPI deb remote, a caching proxy for an upstream repository. Supports `mirrorlist` and `mirror_strategy`.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## rpm / deb / alpine-specific Attributes
```terraform
# Deb remote proxies a Debian/apt package repository.
# The provider knows the index files (Release, Packages) are mutable; .deb packages are immutable.
resource "artifactapi_remote_deb" "debian" {
name = "debian"
base_url = "http://deb.debian.org/debian"
description = "Debian apt package repository"
| Attribute | Default | Description |
|-------------------|---------------|-------------------------------------------------------------------------------------------------|
| `mirrorlist` | | Extra upstream mirror base URLs. Requests are load-balanced with failover across `base_url` + `mirrorlist`. |
| `mirror_strategy` | `round_robin` | Mirror load-balancing strategy across `base_url` + `mirrorlist`. One of `round_robin` or `least_conn`. |
Only valid on the `artifactapi_remote_rpm`, `artifactapi_remote_deb`, and
`artifactapi_remote_alpine` resources. Setting either on any other remote type is
rejected at plan time.
```hcl
resource "artifactapi_remote_rpm" "epel" {
name = "epel-9"
base_url = "https://download.example.com/pub/epel/9/Everything/x86_64"
mirrorlist = [
"https://mirror-a.example.net/epel/9/Everything/x86_64",
"https://mirror-b.example.org/epel/9/Everything/x86_64",
]
mirror_strategy = "least_conn"
immutable_ttl = 0
mutable_ttl = 7200
}
```
## Example
<!-- schema generated by tfplugindocs -->
## Schema
See `examples/resources/artifactapi_remote_deb/main.tf`.
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_deb.debian debian
```
+64 -36
View File
@@ -1,44 +1,24 @@
# `artifactapi_remote_docker`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_docker Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI docker remote, a caching proxy for an upstream repository. Tag manifests are mutable and blobs are immutable; ban_tags blocks specific tags.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_docker (Resource)
## Common Attributes
Manages an ArtifactAPI docker remote, a caching proxy for an upstream repository. Tag manifests are mutable and blobs are immutable; `ban_tags` blocks specific tags.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Docker-specific Attributes
| Attribute | Default | Description |
|--------------------|---------|----------------------------|
| `ban_tags_enabled` | `false` | Enable tag banning |
| `ban_tags` | | List of tags to ban |
## Example
```hcl
```terraform
# Docker remote proxies a container registry.
# The provider auto-classifies: tag manifests are mutable, blobs are immutable.
resource "artifactapi_remote_docker" "dockerhub" {
name = "dockerhub"
base_url = "https://registry-1.docker.io"
name = "dockerhub"
base_url = "https://registry-1.docker.io"
description = "Docker Hub registry"
immutable_ttl = 0
mutable_ttl = 300
@@ -46,8 +26,56 @@ resource "artifactapi_remote_docker" "dockerhub" {
ban_tags = ["latest"]
patterns = [
"^library/almalinux",
"^library/postgres",
"^library/redis",
"^bitnami/",
]
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_docker.dockerhub dockerhub
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_gems`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_gems Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI gems remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_gems (Resource)
## Common Attributes
Manages an ArtifactAPI gems remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# Gems remote proxies a RubyGems source.
# The provider knows the compact index is mutable; .gem downloads are immutable.
resource "artifactapi_remote_gems" "rubygems" {
name = "rubygems"
base_url = "https://rubygems.org"
description = "rubygems.org"
See `examples/resources/artifactapi_remote_gems/main.tf`.
immutable_ttl = 0
mutable_ttl = 300
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_gems.rubygems rubygems
```
+78 -26
View File
@@ -1,31 +1,83 @@
# `artifactapi_remote_generic`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_generic Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI generic remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_generic (Resource)
## Common Attributes
Manages an ArtifactAPI generic remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# A generic remote proxies arbitrary HTTP endpoints.
# Patterns act as an allowlist; everything matching is immutable by default.
resource "artifactapi_remote_generic" "github" {
name = "github"
base_url = "https://github.com"
description = "GitHub releases"
See `examples/resources/artifactapi_remote_generic/main.tf`.
immutable_ttl = 0
mutable_ttl = 7200
patterns = [
"ducaale/xh/.*/xh-.*-x86_64-unknown-linux-musl.tar.gz$",
"mikefarah/yq/.*/yq_linux_amd64$",
"neovim/neovim-releases/.*/nvim-linux-x86_64.tar.gz$",
]
# Override: branch archives are mutable
mutable_patterns = [
".*/archive/refs/heads/.*\\.tar\\.gz$",
]
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_generic.github github
```
+84 -42
View File
@@ -1,51 +1,93 @@
# `artifactapi_remote_github_alpine`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_github_alpine Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI github_alpine remote, a caching proxy for an upstream repository. Exposes a GitHub repository's release .apk assets as an apk repository, synthesising APKINDEX.tar.gz from release metadata. Set base_url to the releases API root (https://api.github.com/repos/{owner}/{repo}) and releases_remote to a generic github.com remote that streams the package bytes; package downloads 302-redirect there. patterns filters which release assets become packages (regex on asset filename). password may hold a token for private repos or higher API rate limits.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_github_alpine (Resource)
## Common Attributes
Manages an ArtifactAPI github_alpine remote, a caching proxy for an upstream repository. Exposes a GitHub repository's release `.apk` assets as an apk repository, synthesising `APKINDEX.tar.gz` from release metadata. Set `base_url` to the releases API root (`https://api.github.com/repos/{owner}/{repo}`) and `releases_remote` to a generic `github.com` remote that streams the package bytes; package downloads 302-redirect there. `patterns` filters which release assets become packages (regex on asset filename). `password` may hold a token for private repos or higher API rate limits.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Terraform / github_rpm / github_deb / github_alpine-specific Attributes
```terraform
# Backend generic remote that serves the actual .apk bytes from github.com.
# Its patterns must allowlist the target repo's release-download assets.
resource "artifactapi_remote_generic" "github" {
name = "github"
base_url = "https://github.com"
| Attribute | Default | Description |
|-------------------|---------|----------------------------------------------------------|
| `releases_remote` | `""` | Name of a backend remote that serves the download bytes. Terraform uses it for download URL rewriting; `github_rpm`/`github_deb`/`github_alpine` 302-redirect `.rpm`/`.deb`/`.apk` downloads to it. |
| `sync_interval` | `0` | Release re-scan interval in seconds, `0`..`2592000` (`0` = `mutable_ttl`). `github_rpm`/`github_deb`/`github_alpine` only; rejected at plan time elsewhere. |
patterns = [
"acme/tools/releases/download/.*\\.apk$",
]
}
## Notes
# Metadata-only remote: scans acme/tools releases for .apk assets and serves a
# synthesized apk repo (APKINDEX). Packages are never precached; downloads
# 302-redirect to the "github" remote above.
resource "artifactapi_remote_github_alpine" "acme_tools" {
name = "acme-tools"
base_url = "https://api.github.com/repos/acme/tools"
description = "acme/tools GitHub releases as an apk repo"
releases_remote = artifactapi_remote_generic.github.name
`artifactapi_remote_github_alpine` is the Alpine/apk analog of `github_rpm`: it
exposes a GitHub repo's release `.apk` assets as an `apk` repository, synthesizing
the apk index (`APKINDEX.tar.gz`) from release metadata without precaching
packages. Set `base_url` to the releases API root
(`https://api.github.com/repos/{owner}/{repo}`) and `releases_remote` to a
generic `github.com` remote that streams the `.apk` bytes; `.apk` downloads
302-redirect there. `patterns` filters which release assets become packages
(regex on asset filename). `password` may hold a token for private repos or
higher API rate limits. See
`examples/resources/artifactapi_remote_github_alpine/main.tf`.
mutable_ttl = 3600
## Example
# Optional: restrict which release assets become packages.
patterns = [
".*_x86_64\\.apk$",
".*_noarch\\.apk$",
]
See `examples/resources/artifactapi_remote_github_alpine/main.tf`.
# Optional: token for private repos / higher GitHub API rate limits.
# password = var.github_token
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_github_alpine.acme_tools acme-tools
```
+84 -42
View File
@@ -1,51 +1,93 @@
# `artifactapi_remote_github_deb`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_github_deb Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI github_deb remote, a caching proxy for an upstream repository. Exposes a GitHub repository's release .deb assets as an apt repository, synthesising Packages/Release from release metadata. Set base_url to the releases API root (https://api.github.com/repos/{owner}/{repo}) and releases_remote to a generic github.com remote that streams the package bytes; package downloads 302-redirect there. patterns filters which release assets become packages (regex on asset filename). password may hold a token for private repos or higher API rate limits.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_github_deb (Resource)
## Common Attributes
Manages an ArtifactAPI github_deb remote, a caching proxy for an upstream repository. Exposes a GitHub repository's release `.deb` assets as an apt repository, synthesising `Packages`/`Release` from release metadata. Set `base_url` to the releases API root (`https://api.github.com/repos/{owner}/{repo}`) and `releases_remote` to a generic `github.com` remote that streams the package bytes; package downloads 302-redirect there. `patterns` filters which release assets become packages (regex on asset filename). `password` may hold a token for private repos or higher API rate limits.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Terraform / github_rpm / github_deb / github_alpine-specific Attributes
```terraform
# Backend generic remote that serves the actual .deb bytes from github.com.
# Its patterns must allowlist the target repo's release-download assets.
resource "artifactapi_remote_generic" "github" {
name = "github"
base_url = "https://github.com"
| Attribute | Default | Description |
|-------------------|---------|----------------------------------------------------------|
| `releases_remote` | `""` | Name of a backend remote that serves the download bytes. Terraform uses it for download URL rewriting; `github_rpm`/`github_deb`/`github_alpine` 302-redirect `.rpm`/`.deb`/`.apk` downloads to it. |
| `sync_interval` | `0` | Release re-scan interval in seconds, `0`..`2592000` (`0` = `mutable_ttl`). `github_rpm`/`github_deb`/`github_alpine` only; rejected at plan time elsewhere. |
patterns = [
"acme/tools/releases/download/.*\\.deb$",
]
}
## Notes
# Metadata-only remote: scans acme/tools releases for .deb assets and serves a
# synthesized apt repo. Packages are never precached; downloads 302-redirect to
# the "github" remote above.
resource "artifactapi_remote_github_deb" "acme_tools" {
name = "acme-tools"
base_url = "https://api.github.com/repos/acme/tools"
description = "acme/tools GitHub releases as an apt repo"
releases_remote = artifactapi_remote_generic.github.name
`artifactapi_remote_github_deb` is the Debian/apt analog of `github_rpm`: it
exposes a GitHub repo's release `.deb` assets as an `apt` repository, synthesizing
the apt index (`Packages`/`Release`) from release metadata without precaching
packages. Set `base_url` to the releases API root
(`https://api.github.com/repos/{owner}/{repo}`) and `releases_remote` to a
generic `github.com` remote that streams the `.deb` bytes; `.deb` downloads
302-redirect there. `patterns` filters which release assets become packages
(regex on asset filename). `password` may hold a token for private repos or
higher API rate limits. See
`examples/resources/artifactapi_remote_github_deb/main.tf`.
mutable_ttl = 3600
## Example
# Optional: restrict which release assets become packages.
patterns = [
".*_amd64\\.deb$",
".*_all\\.deb$",
]
See `examples/resources/artifactapi_remote_github_deb/main.tf`.
# Optional: token for private repos / higher GitHub API rate limits.
# password = var.github_token
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_github_deb.acme_tools acme-tools
```
+90 -40
View File
@@ -1,49 +1,99 @@
# `artifactapi_remote_github_rpm`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_github_rpm Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI github_rpm remote, a caching proxy for an upstream repository. Exposes a GitHub repository's release .rpm assets as a dnf/yum repository without precaching packages. Set base_url to the releases API root (https://api.github.com/repos/{owner}/{repo}) and releases_remote to a generic github.com remote that streams the package bytes; package downloads 302-redirect there. patterns filters which release assets become packages (regex on asset filename). password may hold a token for private repos or higher API rate limits.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_github_rpm (Resource)
## Common Attributes
Manages an ArtifactAPI github_rpm remote, a caching proxy for an upstream repository. Exposes a GitHub repository's release `.rpm` assets as a dnf/yum repository without precaching packages. Set `base_url` to the releases API root (`https://api.github.com/repos/{owner}/{repo}`) and `releases_remote` to a generic `github.com` remote that streams the package bytes; package downloads 302-redirect there. `patterns` filters which release assets become packages (regex on asset filename). `password` may hold a token for private repos or higher API rate limits.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Terraform / github_rpm / github_deb / github_alpine-specific Attributes
```terraform
# Backend generic remote that serves the actual .rpm bytes from github.com.
# Its patterns must allowlist the target repo's release-download assets.
resource "artifactapi_remote_generic" "github" {
name = "github"
base_url = "https://github.com"
| Attribute | Default | Description |
|-------------------|---------|----------------------------------------------------------|
| `releases_remote` | `""` | Name of a backend remote that serves the download bytes. Terraform uses it for download URL rewriting; `github_rpm`/`github_deb`/`github_alpine` 302-redirect `.rpm`/`.deb`/`.apk` downloads to it. |
| `cache_repodata` | `false` | Cache generated repodata (`github_rpm` only). |
| `sync_interval` | `0` | Release re-scan interval in seconds, `0`..`2592000` (`0` = `mutable_ttl`). `github_rpm`/`github_deb`/`github_alpine` only; rejected at plan time elsewhere. |
patterns = [
"acme/tools/releases/download/.*\\.rpm$",
]
}
## Notes
# Metadata-only remote: scans acme/tools releases for .rpm assets and serves a
# synthesized yum repo. Packages are never precached; downloads 302-redirect to
# the "github" remote above.
resource "artifactapi_remote_github_rpm" "acme_tools" {
name = "acme-tools"
base_url = "https://api.github.com/repos/acme/tools"
description = "acme/tools GitHub releases as a yum repo"
releases_remote = artifactapi_remote_generic.github.name
`artifactapi_remote_github_rpm` exposes a GitHub repo's releases as a `dnf`/`yum`
repository without precaching packages. Set `base_url` to the releases API root
(`https://api.github.com/repos/{owner}/{repo}`) and `releases_remote` to a
generic `github.com` remote that streams the `.rpm` bytes. `patterns` filters
which release assets become packages (regex on asset filename). `password` may
hold a token for private repos or higher API rate limits. See
`examples/resources/artifactapi_remote_github_rpm/main.tf`.
mutable_ttl = 3600
## Example
# Optional: re-scan releases every 15 minutes, cache the generated repodata,
# and let virtuals serve the last good index while this remote refreshes.
sync_interval = 900
cache_repodata = true
serve_stale = true
See `examples/resources/artifactapi_remote_github_rpm/main.tf`.
# Optional: restrict which release assets become packages.
patterns = [
".*\\.x86_64\\.rpm$",
".*\\.noarch\\.rpm$",
]
# Optional: token for private repos / higher GitHub API rate limits.
# password = var.github_token
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_github_rpm.acme_tools acme-tools
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_goproxy`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_goproxy Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI goproxy remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_goproxy (Resource)
## Common Attributes
Manages an ArtifactAPI goproxy remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# Go module proxy remote proxies a Go module proxy.
# The provider knows @v/list is mutable; .zip, .mod, and .info files are immutable.
resource "artifactapi_remote_goproxy" "goproxy" {
name = "goproxy"
base_url = "https://proxy.golang.org"
description = "Go module proxy"
See `examples/resources/artifactapi_remote_goproxy/main.tf`.
immutable_ttl = 0
mutable_ttl = 300
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_goproxy.goproxy goproxy
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_helm`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_helm Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI helm remote, a caching proxy for an upstream repository. index.yaml is mutable; chart archives are immutable.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_helm (Resource)
## Common Attributes
Manages an ArtifactAPI helm remote, a caching proxy for an upstream repository. `index.yaml` is mutable; chart archives are immutable.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# Helm remote proxies a Helm chart repository.
# The provider knows index.yaml is mutable; chart tarballs are immutable.
resource "artifactapi_remote_helm" "jetstack" {
name = "jetstack"
base_url = "https://charts.jetstack.io"
description = "Jetstack Helm charts (cert-manager)"
See `examples/resources/artifactapi_remote_helm/main.tf`.
immutable_ttl = 0
mutable_ttl = 3600
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_helm.jetstack jetstack
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_npm`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_npm Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI npm remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_npm (Resource)
## Common Attributes
Manages an ArtifactAPI npm remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# NPM remote proxies an npm registry.
# The provider knows package metadata is mutable; tarballs are immutable.
resource "artifactapi_remote_npm" "npmjs" {
name = "npmjs"
base_url = "https://registry.npmjs.org"
description = "npm public registry"
See `examples/resources/artifactapi_remote_npm/main.tf`.
immutable_ttl = 0
mutable_ttl = 900
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_npm.npmjs npmjs
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_puppet`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_puppet Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI puppet remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_puppet (Resource)
## Common Attributes
Manages an ArtifactAPI puppet remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# Puppet remote proxies a Puppet Forge repository.
# The provider knows module metadata is mutable; release tarballs are immutable.
resource "artifactapi_remote_puppet" "puppet_forge" {
name = "puppet-forge"
base_url = "https://forgeapi.puppet.com"
description = "Puppet Forge module repository"
See `examples/resources/artifactapi_remote_puppet/main.tf`.
immutable_ttl = 0
mutable_ttl = 3600
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_puppet.puppet_forge puppet-forge
```
+67 -26
View File
@@ -1,31 +1,72 @@
# `artifactapi_remote_pypi`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_pypi Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI pypi remote, a caching proxy for an upstream repository.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_pypi (Resource)
## Common Attributes
Manages an ArtifactAPI pypi remote, a caching proxy for an upstream repository.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# PyPI remote proxies a Python package index.
# The provider knows /simple/ index pages are mutable; sdists and wheels are immutable.
resource "artifactapi_remote_pypi" "pypi" {
name = "pypi"
base_url = "https://pypi.org"
description = "Python Package Index"
See `examples/resources/artifactapi_remote_pypi/main.tf`.
immutable_ttl = 0
mutable_ttl = 900
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_pypi.pypi pypi
```
+71 -42
View File
@@ -1,54 +1,83 @@
# `artifactapi_remote_rpm`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_rpm Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI rpm remote, a caching proxy for an upstream repository. repodata/* is mutable and packages are immutable. Supports mirrorlist and mirror_strategy.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_rpm (Resource)
## Common Attributes
Manages an ArtifactAPI rpm remote, a caching proxy for an upstream repository. `repodata/*` is mutable and packages are immutable. Supports `mirrorlist` and `mirror_strategy`.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## rpm / deb / alpine-specific Attributes
```terraform
# RPM remote proxies an RPM package repository.
# The provider knows repodata/* is mutable; RPM packages are immutable.
resource "artifactapi_remote_rpm" "almalinux" {
name = "almalinux"
base_url = "https://repo.almalinux.org/almalinux"
description = "AlmaLinux RPM package repository"
| Attribute | Default | Description |
|-------------------|---------------|-------------------------------------------------------------------------------------------------|
| `mirrorlist` | | Extra upstream mirror base URLs. Requests are load-balanced with failover across `base_url` + `mirrorlist`. |
| `mirror_strategy` | `round_robin` | Mirror load-balancing strategy across `base_url` + `mirrorlist`. One of `round_robin` or `least_conn`. |
Only valid on the `artifactapi_remote_rpm`, `artifactapi_remote_deb`, and
`artifactapi_remote_alpine` resources. Setting either on any other remote type is
rejected at plan time.
```hcl
resource "artifactapi_remote_rpm" "epel" {
name = "epel-9"
base_url = "https://download.example.com/pub/epel/9/Everything/x86_64"
# Extra mirrors; requests are load-balanced with failover across
# base_url + mirrorlist (rpm/deb/alpine remotes only).
mirrorlist = [
"https://mirror-a.example.net/epel/9/Everything/x86_64",
"https://mirror-b.example.org/epel/9/Everything/x86_64",
"https://mirror-a.example.net/almalinux",
"https://mirror-b.example.org/almalinux",
]
# Load-balancing strategy across base_url + mirrorlist:
# "round_robin" (default) or "least_conn".
mirror_strategy = "least_conn"
immutable_ttl = 0
mutable_ttl = 7200
}
```
## Example
<!-- schema generated by tfplugindocs -->
## Schema
See `examples/resources/artifactapi_remote_rpm/main.tf`.
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_rpm.almalinux almalinux
```
+83 -30
View File
@@ -1,37 +1,90 @@
# `artifactapi_remote_terraform`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_terraform Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI terraform remote, a caching proxy for an upstream repository. Provider download URLs are rewritten to the generic remote named in releases_remote.
---
Per-type remote resources manage upstream repository proxies. Each type applies its own mutability classification rules automatically (e.g., Docker classifies tag manifests as mutable and blobs as immutable; Helm classifies `index.yaml` as mutable).
# artifactapi_remote_terraform (Resource)
## Common Attributes
Manages an ArtifactAPI terraform remote, a caching proxy for an upstream repository. Provider download URLs are rewritten to the generic remote named in `releases_remote`.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Terraform / github_rpm / github_deb / github_alpine-specific Attributes
```terraform
# A generic remote is needed for the releases CDN that the Terraform registry
# redirects provider downloads to.
resource "artifactapi_remote_generic" "hashicorp_releases" {
name = "hashicorp-releases"
base_url = "https://releases.hashicorp.com"
description = "HashiCorp product releases"
| Attribute | Default | Description |
|-------------------|---------|----------------------------------------------------------|
| `releases_remote` | `""` | Name of a backend remote that serves the download bytes. Terraform uses it for download URL rewriting; `github_rpm`/`github_deb`/`github_alpine` 302-redirect `.rpm`/`.deb`/`.apk` downloads to it. |
immutable_ttl = 0
mutable_ttl = 7200
## Example
patterns = [
"terraform/.*terraform_.*_linux_amd64\\.zip$",
"vault/.*vault_.*_linux_amd64\\.zip$",
]
}
See `examples/resources/artifactapi_remote_terraform/main.tf`.
# Terraform registry remote proxies the Terraform provider registry.
# The releases_remote attribute points to a generic remote that serves
# the actual provider/module archives after URL rewriting.
resource "artifactapi_remote_terraform" "terraform_registry" {
name = "terraform-registry"
base_url = "https://registry.terraform.io"
description = "Terraform provider registry"
releases_remote = artifactapi_remote_generic.hashicorp_releases.name
immutable_ttl = 0
mutable_ttl = 300
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_terraform.terraform_registry terraform-registry
```
+70 -26
View File
@@ -1,31 +1,75 @@
# `artifactapi_remote_vcs`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_remote_vcs Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI vcs remote, a caching proxy for an upstream repository. Caches GitHub (base_url = "https://github.com") or Gitea source archives and release assets. Tag, commit and release-download paths are immutable; branch archives redirect to the archive of the branch's current commit, re-resolved after mutable_ttl.
---
Caches GitHub (`base_url = "https://github.com"`) or Gitea source archives and release assets. Tag, commit and release-download paths are immutable; branch archives redirect to the archive of the branch's current commit, re-resolved after `mutable_ttl`. Paths: [vcs remote](https://git.unkin.net/unkin/artifactapi/src/branch/master/docs/vcs/remote.md).
# artifactapi_remote_vcs (Resource)
## Common Attributes
Manages an ArtifactAPI vcs remote, a caching proxy for an upstream repository. Caches GitHub (`base_url = "https://github.com"`) or Gitea source archives and release assets. Tag, commit and release-download paths are immutable; branch archives redirect to the archive of the branch's current commit, re-resolved after `mutable_ttl`.
| Attribute | Required | Default | Description |
|----------------------|----------|---------|-------------------------------------------------------------------|
| `name` | Yes | | Unique name (forces replacement on change) |
| `base_url` | Yes | | Upstream repository URL |
| `description` | No | `""` | Human-readable description |
| `username` | No | `""` | Upstream auth username (sensitive) |
| `password` | No | `""` | Upstream auth password (sensitive) |
| `immutable_ttl` | No | `0` | TTL in seconds for immutable artifacts (0 = cache forever) |
| `mutable_ttl` | No | `3600` | TTL in seconds for mutable artifacts |
| `check_mutable` | No | `true` | Enable conditional revalidation for mutable artifacts |
| `patterns` | No | | Allowlist of path patterns to proxy (empty = all) |
| `blocklist` | No | | Paths to always deny (checked before patterns) |
| `mutable_patterns` | No | | Override: treat matching paths as mutable |
| `immutable_patterns` | No | | Override: treat matching paths as immutable |
| `quarantine_enabled` | No | `false` | Enable quarantine for new artifacts |
| `quarantine_days` | No | `3` | Days to quarantine new artifacts |
| `stale_on_error` | No | `true` | Serve stale cache when upstream is unreachable |
| `serve_stale` | No | `false` | Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes |
| `upstream_dial_timeout` | No | `0` | Upstream TCP connect timeout in seconds (0 = server default) |
| `upstream_tls_timeout` | No | `0` | Upstream TLS handshake timeout in seconds (0 = server default) |
| `upstream_response_header_timeout` | No | `0` | Upstream response-header timeout in seconds (0 = server default) |
## Example Usage
## Example
```terraform
# VCS remote caches GitHub/Gitea source archives and release assets.
# Tag, commit and release paths are immutable; branch archives redirect to
# the archive of the branch's current commit, re-resolved after mutable_ttl.
resource "artifactapi_remote_vcs" "github" {
name = "github-vcs"
base_url = "https://github.com"
description = "GitHub source archives and release assets"
See `examples/resources/artifactapi_remote_vcs/main.tf`.
immutable_ttl = 0
mutable_ttl = 600
patterns = ["^cli/cli/", "^psf/requests/"]
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `base_url` (String) Upstream repository base URL.
- `name` (String) Unique name of the remote.
### Optional
- `ban_tags` (List of String) Tags to ban (docker only).
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
- `blocklist` (List of String) Paths to always deny (checked before patterns).
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
- `description` (String) Human-readable description.
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
- `password` (String, Sensitive) Password or token for upstream authentication.
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
- `username` (String, Sensitive) Username for upstream authentication.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_remote_vcs.github github-vcs
```
+60 -11
View File
@@ -1,12 +1,44 @@
# `artifactapi_virtual`
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "artifactapi_virtual Resource - artifactapi"
subcategory: ""
description: |-
Manages an ArtifactAPI virtual repository that merges multiple remotes.
---
Virtual repositories merge multiple remotes of the same package type into a single endpoint.
# artifactapi_virtual (Resource)
```hcl
Manages an ArtifactAPI virtual repository that merges multiple remotes.
## Example Usage
```terraform
# Helm remotes to be merged into a virtual repository
resource "artifactapi_remote_helm" "jetstack" {
name = "jetstack"
base_url = "https://charts.jetstack.io"
description = "Jetstack Helm charts (cert-manager)"
immutable_ttl = 0
mutable_ttl = 3600
}
resource "artifactapi_remote_helm" "hashicorp_helm" {
name = "hashicorp-helm"
base_url = "https://helm.releases.hashicorp.com"
description = "HashiCorp Helm charts"
immutable_ttl = 0
mutable_ttl = 3600
}
# Virtual repository merges multiple remotes of the same package type
# into a single endpoint. Earlier members have higher priority for
# duplicate entries.
resource "artifactapi_virtual" "helm" {
name = "helm"
package_type = "helm"
description = "All helm repos merged"
description = "All Helm repos merged"
members = [
artifactapi_remote_helm.jetstack.name,
@@ -15,10 +47,27 @@ resource "artifactapi_virtual" "helm" {
}
```
| Attribute | Required | Description |
|----------------|----------|-------------------------------------------|
| `name` | Yes | Unique name (forces replacement on change)|
| `package_type` | Yes | Package type of member remotes |
| `description` | No | Human-readable description |
| `members` | Yes | List of remote names to include |
| `parallel_fetch` | No | Fetch each member's index files concurrently (rpm/deb); default `false` |
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `members` (List of String) Ordered list of member remote names. Earlier members have higher priority for duplicate entries.
- `name` (String) Unique name of the virtual repository.
- `package_type` (String) Package type (must match member remotes): helm, pypi.
### Optional
- `description` (String) Human-readable description.
- `parallel_fetch` (Boolean) Fetch each member's index files concurrently.
## Import
Import is supported using the following syntax:
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
```shell
# Import by name.
terraform import artifactapi_virtual.helm helm
```
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Read the configuration of an existing remote by name.
# All fields (base_url, package_type, TTLs, patterns, etc.) are available
# as computed attributes.
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Read the configuration of an existing virtual repository by name.
# Returns the package type, description, and ordered member list.
data "artifactapi_virtual" "helm" {
-205
View File
@@ -1,205 +0,0 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
# token is read from ARTIFACTAPI_TOKEN when unset
}
# ---------------------------------------------------------------------------
# Generic remotes
# ---------------------------------------------------------------------------
resource "artifactapi_remote_generic" "github" {
name = "github"
base_url = "https://github.com"
description = "GitHub releases"
immutable_ttl = 0
mutable_ttl = 7200
patterns = [
"ducaale/xh/.*/xh-.*-x86_64-unknown-linux-musl.tar.gz$",
"mikefarah/yq/.*/yq_linux_amd64$",
"neovim/neovim-releases/.*/nvim-linux-x86_64.tar.gz$",
]
mutable_patterns = [
".*/archive/refs/heads/.*\\.tar\\.gz$",
]
}
resource "artifactapi_remote_generic" "hashicorp_releases" {
name = "hashicorp-releases"
base_url = "https://releases.hashicorp.com"
description = "HashiCorp product releases"
immutable_ttl = 0
mutable_ttl = 7200
patterns = [
"terraform/.*terraform_.*_linux_amd64\\.zip$",
"vault/.*vault_.*_linux_amd64\\.zip$",
]
}
# ---------------------------------------------------------------------------
# Docker
# ---------------------------------------------------------------------------
resource "artifactapi_remote_docker" "dockerhub" {
name = "dockerhub"
base_url = "https://registry-1.docker.io"
description = "Docker Hub registry"
immutable_ttl = 0
mutable_ttl = 300
ban_tags_enabled = true
ban_tags = ["latest"]
patterns = [
"^library/almalinux",
"^library/postgres",
"^library/redis",
"^bitnami/",
]
}
# ---------------------------------------------------------------------------
# Helm
# ---------------------------------------------------------------------------
resource "artifactapi_remote_helm" "jetstack" {
name = "jetstack"
base_url = "https://charts.jetstack.io"
description = "Jetstack Helm charts (cert-manager)"
immutable_ttl = 0
mutable_ttl = 3600
}
resource "artifactapi_remote_helm" "hashicorp_helm" {
name = "hashicorp-helm"
base_url = "https://helm.releases.hashicorp.com"
description = "HashiCorp Helm charts"
immutable_ttl = 0
mutable_ttl = 3600
}
# ---------------------------------------------------------------------------
# Language package managers
# ---------------------------------------------------------------------------
resource "artifactapi_remote_pypi" "pypi" {
name = "pypi"
base_url = "https://pypi.org"
description = "Python Package Index"
immutable_ttl = 0
mutable_ttl = 900
}
resource "artifactapi_remote_npm" "npmjs" {
name = "npmjs"
base_url = "https://registry.npmjs.org"
description = "npm public registry"
immutable_ttl = 0
mutable_ttl = 900
}
# ---------------------------------------------------------------------------
# OS package managers
# ---------------------------------------------------------------------------
resource "artifactapi_remote_rpm" "almalinux" {
name = "almalinux"
base_url = "https://gsl-syd.mm.fcix.net/almalinux"
description = "AlmaLinux RPM package repository"
immutable_ttl = 0
mutable_ttl = 7200
}
resource "artifactapi_remote_alpine" "alpine" {
name = "alpine"
base_url = "https://dl-cdn.alpinelinux.org"
description = "Alpine Linux APK package repository"
immutable_ttl = 0
mutable_ttl = 7200
}
# ---------------------------------------------------------------------------
# Infrastructure tooling
# ---------------------------------------------------------------------------
resource "artifactapi_remote_terraform" "terraform_registry" {
name = "terraform-registry"
base_url = "https://registry.terraform.io"
description = "Terraform provider registry"
releases_remote = artifactapi_remote_generic.hashicorp_releases.name
immutable_ttl = 0
mutable_ttl = 300
}
resource "artifactapi_remote_goproxy" "goproxy" {
name = "goproxy"
base_url = "https://proxy.golang.org"
description = "Go module proxy"
immutable_ttl = 0
mutable_ttl = 300
}
resource "artifactapi_remote_puppet" "puppet_forge" {
name = "puppet-forge"
base_url = "https://forgeapi.puppet.com"
description = "Puppet Forge module repository"
immutable_ttl = 0
mutable_ttl = 3600
}
# ---------------------------------------------------------------------------
# Virtual repositories
# ---------------------------------------------------------------------------
resource "artifactapi_virtual" "helm" {
name = "helm"
package_type = "helm"
description = "All Helm repos merged"
members = [
artifactapi_remote_helm.jetstack.name,
artifactapi_remote_helm.hashicorp_helm.name,
]
}
# ---------------------------------------------------------------------------
# Data sources
# ---------------------------------------------------------------------------
data "artifactapi_remote" "dockerhub" {
name = artifactapi_remote_docker.dockerhub.name
}
data "artifactapi_virtual" "helm" {
name = artifactapi_virtual.helm.name
}
output "dockerhub_base_url" {
value = data.artifactapi_remote.dockerhub.base_url
}
output "helm_members" {
value = data.artifactapi_virtual.helm.members
}
+12
View File
@@ -0,0 +1,12 @@
terraform {
required_providers {
artifactapi = {
source = "IUCLabs/artifactapi"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
# token defaults to the ARTIFACTAPI_TOKEN environment variable
}
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_alpine.internal alpine-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_ansible.internal ansible-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_deb.internal deb-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_docker.internal docker-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_gems.internal gems-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_generic.rootfs_images rootfs-images
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_goproxy.internal go-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_helm.internal helm-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_npm.internal npm-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_puppet.internal puppet-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_pypi.internal pypi-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_rpm.internal rpm-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_local_terraform.internal tf-internal
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_alpine.alpine alpine
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Alpine remote proxies an Alpine Linux APK repository.
# The provider knows APKINDEX.tar.gz is mutable; .apk packages are immutable.
resource "artifactapi_remote_alpine" "alpine" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_ansible.galaxy galaxy
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Ansible remote proxies the Galaxy v3 collections API.
# The provider knows JSON metadata is mutable; collection tarballs are immutable.
resource "artifactapi_remote_ansible" "galaxy" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_cargo.crates_io crates-io
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Cargo remote proxies a crates.io sparse registry.
# The provider knows index files are mutable; .crate downloads are immutable.
resource "artifactapi_remote_cargo" "crates_io" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_deb.debian debian
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Deb remote proxies a Debian/apt package repository.
# The provider knows the index files (Release, Packages) are mutable; .deb packages are immutable.
resource "artifactapi_remote_deb" "debian" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_docker.dockerhub dockerhub
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Docker remote proxies a container registry.
# The provider auto-classifies: tag manifests are mutable, blobs are immutable.
resource "artifactapi_remote_docker" "dockerhub" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_gems.rubygems rubygems
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Gems remote proxies a RubyGems source.
# The provider knows the compact index is mutable; .gem downloads are immutable.
resource "artifactapi_remote_gems" "rubygems" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_generic.github github
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# A generic remote proxies arbitrary HTTP endpoints.
# Patterns act as an allowlist; everything matching is immutable by default.
resource "artifactapi_remote_generic" "github" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_github_alpine.acme_tools acme-tools
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Backend generic remote that serves the actual .apk bytes from github.com.
# Its patterns must allowlist the target repo's release-download assets.
resource "artifactapi_remote_generic" "github" {
@@ -18,17 +5,17 @@ resource "artifactapi_remote_generic" "github" {
base_url = "https://github.com"
patterns = [
"goodtune/ghp/releases/download/.*\\.apk$",
"acme/tools/releases/download/.*\\.apk$",
]
}
# Metadata-only remote: scans goodtune/ghp releases for .apk assets and serves a
# Metadata-only remote: scans acme/tools releases for .apk assets and serves a
# synthesized apk repo (APKINDEX). Packages are never precached; downloads
# 302-redirect to the "github" remote above.
resource "artifactapi_remote_github_alpine" "goodtune_ghp" {
name = "goodtune-ghp"
base_url = "https://api.github.com/repos/goodtune/ghp"
description = "goodtune/ghp GitHub releases as an apk repo"
resource "artifactapi_remote_github_alpine" "acme_tools" {
name = "acme-tools"
base_url = "https://api.github.com/repos/acme/tools"
description = "acme/tools GitHub releases as an apk repo"
releases_remote = artifactapi_remote_generic.github.name
mutable_ttl = 3600
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_github_deb.acme_tools acme-tools
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Backend generic remote that serves the actual .deb bytes from github.com.
# Its patterns must allowlist the target repo's release-download assets.
resource "artifactapi_remote_generic" "github" {
@@ -18,17 +5,17 @@ resource "artifactapi_remote_generic" "github" {
base_url = "https://github.com"
patterns = [
"goodtune/ghp/releases/download/.*\\.deb$",
"acme/tools/releases/download/.*\\.deb$",
]
}
# Metadata-only remote: scans goodtune/ghp releases for .deb assets and serves a
# Metadata-only remote: scans acme/tools releases for .deb assets and serves a
# synthesized apt repo. Packages are never precached; downloads 302-redirect to
# the "github" remote above.
resource "artifactapi_remote_github_deb" "goodtune_ghp" {
name = "goodtune-ghp"
base_url = "https://api.github.com/repos/goodtune/ghp"
description = "goodtune/ghp GitHub releases as an apt repo"
resource "artifactapi_remote_github_deb" "acme_tools" {
name = "acme-tools"
base_url = "https://api.github.com/repos/acme/tools"
description = "acme/tools GitHub releases as an apt repo"
releases_remote = artifactapi_remote_generic.github.name
mutable_ttl = 3600
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_github_rpm.acme_tools acme-tools
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Backend generic remote that serves the actual .rpm bytes from github.com.
# Its patterns must allowlist the target repo's release-download assets.
resource "artifactapi_remote_generic" "github" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_goproxy.goproxy goproxy
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Go module proxy remote proxies a Go module proxy.
# The provider knows @v/list is mutable; .zip, .mod, and .info files are immutable.
resource "artifactapi_remote_goproxy" "goproxy" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_helm.jetstack jetstack
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Helm remote proxies a Helm chart repository.
# The provider knows index.yaml is mutable; chart tarballs are immutable.
resource "artifactapi_remote_helm" "jetstack" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_npm.npmjs npmjs
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# NPM remote proxies an npm registry.
# The provider knows package metadata is mutable; tarballs are immutable.
resource "artifactapi_remote_npm" "npmjs" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_puppet.puppet_forge puppet-forge
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# Puppet remote proxies a Puppet Forge repository.
# The provider knows module metadata is mutable; release tarballs are immutable.
resource "artifactapi_remote_puppet" "puppet_forge" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_pypi.pypi pypi
@@ -1,16 +1,3 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# PyPI remote proxies a Python package index.
# The provider knows /simple/ index pages are mutable; sdists and wheels are immutable.
resource "artifactapi_remote_pypi" "pypi" {
@@ -0,0 +1,2 @@
# Import by name.
terraform import artifactapi_remote_rpm.almalinux almalinux
@@ -1,28 +1,15 @@
terraform {
required_providers {
artifactapi = {
source = "artifactapi.example.com/terraform-unkin/artifactapi"
version = "0.0.1"
}
}
}
provider "artifactapi" {
endpoint = "https://artifactapi.example.com"
}
# RPM remote proxies an RPM package repository.
# The provider knows repodata/* is mutable; RPM packages are immutable.
resource "artifactapi_remote_rpm" "almalinux" {
name = "almalinux"
base_url = "https://gsl-syd.mm.fcix.net/almalinux"
base_url = "https://repo.almalinux.org/almalinux"
description = "AlmaLinux RPM package repository"
# Extra mirrors; requests are load-balanced with failover across
# base_url + mirrorlist (rpm/deb/alpine remotes only).
mirrorlist = [
"https://mirror.aarnet.edu.au/pub/almalinux",
"https://mirror.realcompute.io/almalinux",
"https://mirror-a.example.net/almalinux",
"https://mirror-b.example.org/almalinux",
]
# Load-balancing strategy across base_url + mirrorlist:

Some files were not shown because too many files have changed in this diff Show More