Skip to main content
← Back to list
01Issue
FeatureShippedExtensions
Assigneesstack72

Relationships

#471 Support vault expressions for API token instead of env var

Opened by bixu · 5/28/2026· Shipped 5/28/2026

The @swamp/hetzner-cloud extension hardcodes Deno.env.get("HETZNER_API_TOKEN") in _lib/hetzner.ts for authentication. This has two problems:

  1. No vault expression support. Users must set an env var rather than using ${{ vault.get(...) }} in the model definition. This forces token values into the shell environment, which is less secure and doesn't compose with swamp's secret management.

  2. No list method. The servers model is per-server (globalArguments.name binds to one server). There's no way to discover all servers matching a label selector. We had to write a local extension to add this.

Proposed: add an optional token global argument (with sensitive: true) that takes precedence over HETZNER_API_TOKEN env var. This lets users wire it with ${{ vault.get(my-vault, hcloud-token) }} in the model YAML. Also add a list method that queries /v1/servers?label_selector=... and produces one resource per server (factory pattern).

Upstream repository: https://github.com/systeminit/swamp-extensions

Environment

  • Extension: @swamp/hetzner-cloud@2026.05.01.1
  • swamp: 20260527.235818.0-sha.ed572875
  • OS: darwin (aarch64)
  • Deno: 2.7.14+19bd3d8
  • Shell: /bin/zsh
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 8 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

5/28/2026, 8:53:24 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/28/2026, 6:16:42 PM

Sign in to post a ripple.