9 Commits

Author SHA1 Message Date
unkinben 4dd290518d feat: support per-remote upstream timeouts
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Add upstream_dial_timeout, upstream_tls_timeout and
upstream_response_header_timeout (seconds; 0 = server default) to the
remote resource and data source, matching the artifactapi server. Wire
them through the API model, schema, create/read/update mapping, docs and
unit tests.
2026-07-02 22:19:39 +10:00
unkinben 1bddc48e5a feat: add artifactapi_local_pypi and artifactapi_local_rpm resource types
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2026-06-23 23:16:17 +10:00
benvin ddd9e41679 Merge branch 'main' into benvin/add-local-terraform-resource
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2026-06-22 23:59:16 +10:00
unkinben 2653c34f94 feat: add artifactapi_local_terraform resource type
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
New resource for creating local terraform registries in ArtifactAPI
(repo_type=local, package_type=terraform). These repos host providers
directly rather than proxying an upstream registry.

Schema is minimal: just name and description — no upstream-specific
fields like base_url, caching TTLs, or auth.
2026-06-22 23:30:21 +10:00
unkinben d9d8cc7b6d fix: preserve empty list vs null distinction for optional list attributes
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
The API returns null for empty arrays, but OpenTofu requires that the
state match the plan exactly — an empty list [] in the plan must remain
[] in the state, not become null. This caused "inconsistent result after
apply" errors on every resource with empty optional list fields like
mutable_patterns and ban_tags.
2026-06-21 18:42:14 +10:00
unkinben 7c94f06be6 docs: add README, per-resource examples, unit tests, CI, and pre-commit
- Add README.md with provider docs, resource/data-source reference, and
  development instructions
- Reorganize examples into per-resource-type subdirectories following
  Terraform provider conventions, add missing pypi/npm/puppet examples
- Add unit tests for helpers, HTTP client, model conversions, and
  provider registration
- Add Woodpecker CI pipelines for lint, test, and build
- Add pre-commit config with standard and Go-specific hooks
2026-06-07 18:55:48 +10:00
unkinben 31057182aa fix: include all optional fields in schema for all resource types 2026-06-07 16:47:03 +10:00
unkinben e1336c0c87 refactor: per-type resources + simplified classification model
Resources renamed from artifactapi_remote to per-type:
- artifactapi_remote_generic
- artifactapi_remote_docker (with ban_tags)
- artifactapi_remote_helm
- artifactapi_remote_pypi
- artifactapi_remote_npm
- artifactapi_remote_rpm
- artifactapi_remote_alpine
- artifactapi_remote_puppet
- artifactapi_remote_terraform (with releases_remote)
- artifactapi_remote_goproxy

Classification simplified:
- patterns: paths to proxy (empty = all, acts as allowlist)
- blocklist: paths to deny (checked first)
- mutable_patterns: override provider auto-classification
- immutable_patterns: override provider auto-classification
- Provider handles mutability automatically per package type
2026-06-07 16:12:11 +10:00
unkinben ad50a06b33 feat: initial terraform provider for artifactapi v0.0.1
Resources:
- artifactapi_remote: CRUD for remote proxy repositories
- artifactapi_virtual: CRUD for virtual (merged) repositories

Data sources:
- data.artifactapi_remote: read remote config
- data.artifactapi_virtual: read virtual config

Supports all 10 package types (generic, docker, helm, pypi, npm,
rpm, alpine, puppet, terraform, goproxy), allowlist/blocklist,
tag banning, quarantine, and terraform import.
2026-06-07 14:30:20 +10:00