Populate terragrunt-enc: encapi ENC data as code #1

Merged
benvin merged 3 commits from benvin/initial into main 2026-07-24 23:30:27 +10:00
Owner

terragrunt-enc is the single source of truth for encapi ENC data (Puppet statuses, roles, and node classifications), managed with Terraform/Terragrunt. It supersedes Cobbler classification for Puppet and the terraform-incus dual-write prototype (PR #39). This is the initial repo content; main is branch-protected, so it lands via PR.

Changes:

  • Add modules/encapi (encapi_status / encapi_role / encapi_node resources; nodes FK-ordered after their role and status via depends_on).
  • Add the config/encapi leaf: 3 statuses, 51 roles, and 143 node assignments (130 container VMs env production + 13 prodnxsr physicals env develop), all YAML-driven.
  • Add config/root.hcl: consul backend infra/terraform/enc/<leaf>/state and the encapi provider from the artifactapi registry (v0.1.0).
  • Add the Makefile (kubernetes/approle Vault auth, ENCAPI_WRITE_TOKEN + consul creds), Woodpecker pre-commit/plan/apply pipelines, pre-commit config, ci/extract_incus_nodes.py (regenerates the VM block from a terraform-incus checkout), and expand the README.

Note: the plan CI status check only passes once terraform-vault #98 (auth + encapi token grant) and argocd-apps #274 (terraform-enc ServiceAccount) are merged/applied; merging this PR is itself the apply path (Woodpecker applies on push to main).

terragrunt-enc is the single source of truth for encapi ENC data (Puppet statuses, roles, and node classifications), managed with Terraform/Terragrunt. It supersedes Cobbler classification for Puppet and the terraform-incus dual-write prototype (PR #39). This is the initial repo content; main is branch-protected, so it lands via PR. Changes: - Add `modules/encapi` (encapi_status / encapi_role / encapi_node resources; nodes FK-ordered after their role and status via depends_on). - Add the `config/encapi` leaf: 3 statuses, 51 roles, and 143 node assignments (130 container VMs env `production` + 13 `prodnxsr` physicals env `develop`), all YAML-driven. - Add `config/root.hcl`: consul backend `infra/terraform/enc/<leaf>/state` and the encapi provider from the artifactapi registry (v0.1.0). - Add the Makefile (kubernetes/approle Vault auth, ENCAPI_WRITE_TOKEN + consul creds), Woodpecker pre-commit/plan/apply pipelines, pre-commit config, `ci/extract_incus_nodes.py` (regenerates the VM block from a terraform-incus checkout), and expand the README. Note: the `plan` CI status check only passes once terraform-vault #98 (auth + encapi token grant) and argocd-apps #274 (terraform-enc ServiceAccount) are merged/applied; merging this PR is itself the apply path (Woodpecker applies on push to main).
unkinben added 1 commit 2026-07-24 23:13:01 +10:00
Populate terragrunt-enc: encapi ENC data as code
ci/woodpecker/pr/plan Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline was successful
054110d748
terragrunt-enc is the single source of truth for encapi ENC data (Puppet
statuses, roles, and node classifications), managed with Terraform/Terragrunt.
It supersedes Cobbler classification for Puppet and the terraform-incus
dual-write prototype (PR #39).

- Add modules/encapi (encapi_status / encapi_role / encapi_node, nodes
  FK-ordered after their role and status).
- Add config/encapi leaf: 3 statuses, 51 roles, and 143 node assignments
  (130 container VMs env production + 13 prodnxsr physicals env develop),
  all YAML-driven.
- Add config/root.hcl (consul backend infra/terraform/enc/<leaf>/state) and
  the encapi provider from the artifactapi registry (v0.1.0).
- Add Makefile, Woodpecker pre-commit/plan/apply pipelines, pre-commit
  config, ci/extract_incus_nodes.py, and expand the README.
unkinben added 1 commit 2026-07-24 23:23:16 +10:00
Re-run CI: terraform-enc ServiceAccount now provisioned
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline failed
2a8c14b880
unkinben added 1 commit 2026-07-24 23:25:34 +10:00
Fix backend path generation: evaluate path_relative_to_include at generate time
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
8686753885
benvin merged commit d8e54f5e23 into main 2026-07-24 23:30:27 +10:00
benvin deleted branch benvin/initial 2026-07-24 23:30:27 +10:00
Sign in to join this conversation.