terrakube-ops
/terrakube-ops
Obsługuje self-hosted Terrakube: plan i apply, stan, blokady i rotację tokenów dla zdalnego OpenTofu i Terraform.
- Autor
- JacobPEvans ↗
- Repozytorium
- claude-code-plugins ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Obsługuje self-hosted Terrakube: plan i apply, stan, blokady i rotację tokenów dla zdalnego OpenTofu i Terraform.
Oryginalny opis (EN)
Operate self-hosted Terrakube (remote OpenTofu/Terraform plan/apply, state, locking) — login/plan/apply flow, gated targeted applies, lock recovery, offline-mirror gotcha, token rotation. Use for a plan/apply, stuck lock, new workspace.
Jak działa
- Canonical workflow
- Targeted applies
- Workspace locking and recovery
- The offline-mirror gotcha
- Token rotation invalidates every session
- Never judge an apply by its exit code alone
- Importing existing infrastructure into an empty workspace
- Verification
- Related
Podgląd SKILL.md
--- name: terrakube-ops description: Operate self-hosted Terrakube (remote OpenTofu/Terraform plan/apply, state, locking) — login/plan/apply flow, gated targeted applies, lock recovery, offline-mirror gotcha, token rotation. Use for a plan/apply, stuck lock, new workspace. --- # Terrakube operations [Terrakube](https://terrakube.io) is a self-hosted remote-execution platform for OpenTofu/Terraform — plans and applies run on its own executor, not on the operator's machine or in CI. This skill is the generic operating model; your own workspace names, hostnames, and credential source stay in your own inventory. ## Canonical workflow ```bash tofu login <terrakube-hostname> # once per machine — opens a browser SSO flow tofu plan # runs remotely; CLI streams the live plan log tofu apply # same remote workspace, same run tofu state list # inspect state / outputs afterward tofu output ``` `tofu plan`/`apply` from the CLI and starting a run from the Terrakube web UI both drive the same remote executor and the same job log — pick whichever is convenient; they're interchangeable. > Local `tofu init -backend=false` + `tofu validate` catches syntax errors > without contacting any provider — run that first, it's free and instant > compared to a remote plan. ## Targeted applies Targeted applies (`-target=...`) are allowed through the gated path: - Run them through the Terrakube `Plan and apply (targeted)` template, with the targets passed as the job's `targetAddrs` (or `TARGET_ADDRS` through a gated converge script). Never run a hand-built CLI `-target` apply that skips the approval gate. - The plan must show zero destroys and zero replaces unless the operator approved those exact resources. - A targeted run leaves everything outside its targets unreconciled. Run a full plan afterward to see what remains. For state surgery, prefer `moved`/`removed` blocks over `-target` or manual state edits. ## Workspace locking and recovery Terrakube owns one run queue and one lock per workspace — a second run simply queues behind the active one; independent workspaces don't share a lock. - Cancel a genuinely stuck run from the workspace UI, not by force-unlocking blind. - Confirm the executor has actually stopped before force-cancelling or unlocking — cancelling a run that's still writing state is how corruption happens. - Prefer fixing forward (revert the config change in git, plan/apply again) over restoring an older state version. When state genuinely is corrupted, preserve the *current* state version before restoring an older one — you may need to diff them later. ## The offline-mirror gotcha An executor eagerly initializes its Terraform-compatible provider downloader even on a workspace that only ever runs **OpenTofu**. If your platform points release/provider resolution at an internal mirror for offline operation, **both** the Terraform-compatibility URL and the OpenTofu release URL need to point at that mirror — leaving either one pointed at a public release service reintroduces an internet dependency and breaks offline recovery exactly when you need it not to. ## Token rotation invalidates every session Rotating whatever secret Terrakube uses to sign its own issued tokens (a `PAT_SECRET`/`INTERNAL_SECRET`-style value) invalidates **every** previously issued personal access token at once. Plan for a `tofu login` re-auth on every machine that touches the platform right after that rotation — it isn't a sign anything else is broken. ## Never judge an apply by its exit code alone A remote apply can exit 0 while its log still contains `Error:` lines and no "Apply complete" summary — a partial failure that looks clean from the exit status. Grep the apply output for both `Error:` and the completion summary (`Apply complete` / `Resources:`); the summary's absence is the real signal, not the process exit code. ## Importing existing infrastructure into an empty workspace Onboarding a root that already manages **live** infrastructure into a workspace whose state starts empty is not a normal apply, and the ordinary 0-destroy review is not enough to make it safe. > A plan against an empty workspace reads "create everything, 0 destroy." > That falsely passes a naive 0-destroy gate — the apply then hits an > already-exists error and duplicates live infrastructure. For an > empty-state workspace the real gate is a **refresh-only plan showing > 0 add / 0 change / 0 destroy** — proof state already matches reality. A > create-everything plan on a workspace that should already hold resources > means the state was never migrated. Recipe: migrate the existing state into the workspace first (a state push, or an init with state migration against the new backend), run a refresh-only plan and require exactly 0/0/0, reconcile any benign drift with `moved`/`removed` blocks rather than destroy-and-recreate, and only then is the ordinary 0-destroy apply gate meaningful. ## Verification 1. The run reaches `applied` (CLI exits 0; UI shows a green Applied state) **and** the log shows a completion summary with no `Error:` lines — see above. 2. `tofu output` reflects the expected values. 3. Re-running `tofu plan` immediately after a clean apply reports "No changes" — if it doesn't, something outside the applied config drifted, or the apply didn't fully land. ## Related - **proxmox-cluster-ops** (this plugin) — the guest-level operations this IaC layer should be the only thing changing. - **infrastructure-standards** (infra-standards) — the inventory contract a producer workspace's outputs typically feed.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · JacobPEvans/claude-code-plugins | 100 | Apache-2.0 |
| dryvist/claude-code-plugins | 100 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki cb35386fb7ae (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Podobne skille
- 100terraform-ops
Prowadzi operacje w Terraform i OpenTofu: układ projektu, stan, moduły, bezpieczne plan i apply, pipeline'y CI/CD, sekrety, wykrywanie dryfu oraz tflint i checkov. - 100terraform
Obsługuje Terraform i OpenTofu w całym cyklu infrastruktury: struktura modułów, backendy stanu i blokady, plan i apply, wykrywanie dryfu, import, refaktoryzacja i diagnostyka oparta na dowodach, ze skryptem tfops. - 100terraform-patterns
Stosuje sprawdzone wzorce Terraform: zdalny stan z blokadą S3, strukturę modułów, środowiska i potok CI z planem oraz apply. - 100terraform-iac
Zarządza infrastrukturą chmurową w Terraform i OpenTofu: pisze konfiguracje i moduły, obsługuje stan, import istniejących zasobów, wiele środowisk oraz błędy plan i apply. - 100terraform-agent
Pisze i waliduje kod Terraform i OpenTofu z zasadą sprawdzania planu przed zastosowaniem zmian infrastruktury. - 85terraform-optimizer
Audytuje kod Terraform i OpenTofu pod kątem struktury modułów i stanu, blokad, przypinania wersji, IAM i kosztów, z pomiarami przed i po.