c69b27826d
Terraform provider (plugin-framework) for the vault-plugin-secrets-rancher secrets engine, modeled on terraform-provider-litellmvaultsecret. Resources: - rancher_secret_backend: mount the engine + write config (rancher_url, ca_cert, tls_skip_verify, request_timeout_seconds). - rancher_secret_backend_service_account: seed an auto-rotated Rancher token (write-only token; token_ttl / rotation_period; computed token_name, last_rotated). - rancher_secret_backend_role: minting role (service_account, cluster_name, ttl, max_ttl, description). Source address git.unkin.net/unkin/ranchervaultsecret, resources prefixed rancher_. Ports the litellm Woodpecker terraform-registry release + nfpm-less zip packaging, examples, and a provider e2e (Vault + mock Rancher from the sibling plugin repo). Unit tests cover the coercion/import-ID helpers.
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
# E2E stack for the provider: a mock Rancher ext.cattle.io API (run from the
|
|
# sibling plugin repo) + a Vault dev server with the rancher plugin mounted.
|
|
# Bind mounts use ":z" for SELinux (Fedora/RHEL).
|
|
services:
|
|
rancher:
|
|
image: golang:1.25-alpine
|
|
working_dir: /src
|
|
environment:
|
|
MOCKRANCHER_ADDR: ":8443"
|
|
MOCKRANCHER_TOKEN: "seed-token"
|
|
GOFLAGS: "-mod=mod"
|
|
# PLUGIN_SRC is the sibling vault-plugin-secrets-rancher checkout, which
|
|
# ships the mock Rancher server under test/mockrancher.
|
|
command: ["go", "run", "./test/mockrancher"]
|
|
volumes:
|
|
- ${PLUGIN_SRC:-../vault-plugin-secrets-rancher}:/src:ro,z
|
|
ports:
|
|
- "8443:8443"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:8443/healthz"]
|
|
interval: 3s
|
|
timeout: 3s
|
|
retries: 40
|
|
|
|
vault:
|
|
image: hashicorp/vault:1.18
|
|
depends_on:
|
|
rancher:
|
|
condition: service_healthy
|
|
cap_add:
|
|
- IPC_LOCK
|
|
environment:
|
|
VAULT_DEV_ROOT_TOKEN_ID: root
|
|
VAULT_ADDR: http://127.0.0.1:8200
|
|
VAULT_TOKEN: root
|
|
command: ["server", "-dev", "-dev-listen-address=0.0.0.0:8200", "-config=/vault/vault.hcl"]
|
|
volumes:
|
|
- ./plugins:/vault/plugins:ro,z
|
|
- ./vault/vault.hcl:/vault/vault.hcl:ro,z
|
|
ports:
|
|
- "8200:8200"
|
|
healthcheck:
|
|
test: ["CMD", "vault", "status", "-address=http://127.0.0.1:8200"]
|
|
interval: 3s
|
|
timeout: 3s
|
|
retries: 20
|