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
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
artifactapi = {
|
||||
source = "git.unkin.net/unkin/artifactapi"
|
||||
version = "0.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "artifactapi" {
|
||||
endpoint = "https://artifactapi.example.com"
|
||||
}
|
||||
|
||||
# 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"
|
||||
|
||||
members = [
|
||||
artifactapi_remote_helm.jetstack.name,
|
||||
artifactapi_remote_helm.hashicorp_helm.name,
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user