Files
T
unkin-agent 36f8f468e7
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Register resources per file and split resource docs
- add registry with per-file init() registration, sorted by type name
- give each remote kind its own resource_remote_<kind>.go
- replace hardcoded resource tables with registry/examples/docs invariants
- move per-resource README sections into docs/resources and docs/data-sources
2026-10-17 15:17:02 +11:00

1.8 KiB

terraform-provider-artifactapi

Terraform provider for managing ArtifactAPI remotes and virtual repositories.

Requirements

  • Go >= 1.23
  • Terraform >= 1.0

Building

make build

Installation

Install the provider to your local Terraform plugin directory:

make install

This places the binary at ~/.terraform.d/plugins/git.unkin.net/unkin/artifactapi/<version>/<os_arch>/.

Provider Configuration

terraform {
  required_providers {
    artifactapi = {
      source  = "git.unkin.net/unkin/artifactapi"
      version = "0.0.1"
    }
  }
}

provider "artifactapi" {
  endpoint = "https://artifactapi.example.com"
  token    = var.artifactapi_token # optional
}
Attribute Required Description
endpoint Yes ArtifactAPI server endpoint URL
token No Bearer token sent as Authorization header; falls back to ARTIFACTAPI_TOKEN

Resources and Data Sources

Each resource is documented in docs/resources/ and each data source in docs/data-sources/, with a matching example under examples/.

Import

Resources can be imported by name:

terraform import artifactapi_remote_docker.dockerhub dockerhub
terraform import artifactapi_virtual.helm helm

Development

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