Grant terraform-incus approle read on encapi environment secret #97

Closed
unkinben wants to merge 1 commits from benvin/terraform-incus-encapi-token into master
Owner

Why

terraform-incus dual-writes ENC (external node classifier) data to encapi via the new encapi Terraform provider. At make apply time the CI runner needs the encapi write token (ENCAPI_WRITE_TOKEN), which lives in Vault at kv/kubernetes/namespace/encapi/default/environment (the same secret the encapi deployment reads via its VaultStaticSecret). The terraform-incus approle currently has no grant for it.

This is a prerequisite for terraform-incus PR #39 (unkin/terraform-incus#39).

Changes

  • Add policy policies/kv/service/terraform/incus-encapi-environment.yaml granting the terraform_incus approle read on kv/data/kubernetes/namespace/encapi/default/environment, following the existing rancher/puppetca policy conventions (data-path read, no metadata grant).
## Why terraform-incus dual-writes ENC (external node classifier) data to encapi via the new encapi Terraform provider. At `make apply` time the CI runner needs the encapi write token (`ENCAPI_WRITE_TOKEN`), which lives in Vault at `kv/kubernetes/namespace/encapi/default/environment` (the same secret the encapi deployment reads via its VaultStaticSecret). The terraform-incus approle currently has no grant for it. This is a prerequisite for terraform-incus PR #39 (https://git.unkin.net/unkin/terraform-incus/pulls/39). ## Changes - Add policy `policies/kv/service/terraform/incus-encapi-environment.yaml` granting the `terraform_incus` approle `read` on `kv/data/kubernetes/namespace/encapi/default/environment`, following the existing rancher/puppetca policy conventions (data-path read, no metadata grant).
unkinben added 1 commit 2026-07-24 22:56:19 +10:00
Grant terraform-incus approle read on encapi environment secret
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline failed
4ec2f92ca5
terraform-incus dual-writes ENC data to encapi and needs the
ENCAPI_WRITE_TOKEN from Vault at apply time. Add a policy granting the
terraform_incus approle read on kv/data/kubernetes/namespace/encapi/default/environment.

Prerequisite for terraform-incus PR #39.
Author
Owner

Closing: superseded by the new dedicated terragrunt-enc repo (all encapi ENC data managed there; no changes to terraform-incus). Replacement PRs incoming.

Closing: superseded by the new dedicated `terragrunt-enc` repo (all encapi ENC data managed there; no changes to terraform-incus). Replacement PRs incoming.
unkinben closed this pull request 2026-07-24 23:01:50 +10:00
Some required checks failed
ci/woodpecker/pr/pre-commit Pipeline was successful
Required
Details
ci/woodpecker/pr/plan Pipeline failed
Required
Details

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/terraform-vault#97