Mint netbox user-management token dynamically #184

Merged
benvin merged 4 commits from benvin/netbox-user-mgmt-dynamic into master 2026-11-17 23:06:44 +11:00
Member

The netbox engine admin token was rotated, so netbox_user_management (still on the static KV admin_token because user_mgmt_username is unset) now fails plan with 403 "Invalid v2 token". The vault-user-mgmt role already exists in Vault.

  • set user_mgmt_username to admin so user management uses the Vault-minted netbox/creds/vault-user-mgmt token
  • declare the vault-secrets-netbox provider in the generated root config
  • import the existing netbox/roles/vault-user-mgmt role into state
The netbox engine admin token was rotated, so netbox_user_management (still on the static KV admin_token because user_mgmt_username is unset) now fails plan with 403 "Invalid v2 token". The vault-user-mgmt role already exists in Vault. - set user_mgmt_username to admin so user management uses the Vault-minted netbox/creds/vault-user-mgmt token - declare the vault-secrets-netbox provider in the generated root config - import the existing netbox/roles/vault-user-mgmt role into state
unkin-agent added 1 commit 2026-11-17 22:54:20 +11:00
Set netbox user_mgmt_username to admin
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was canceled
31e2a5f142
unkin-agent added 1 commit 2026-11-17 22:55:51 +11:00
Import manually created netbox vault-user-mgmt role
ci/woodpecker/pr/plan Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline failed
6bb6232dc1
unkin-agent added 1 commit 2026-11-17 22:57:45 +11:00
Declare netbox vault provider in root module for role import
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline failed
eab246f3f2
unkin-agent added 1 commit 2026-11-17 23:02:29 +11:00
Move netbox role import into generated root config
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
d71842da40
Author
Member
  • environments/root.hcl:77 — netbox required_providers entry (vault-secrets-netbox) has no matching provider "netbox" { address = local.vault_addr } block, unlike every sibling plugin provider here → add the block, or drop the entry if the child modules' own declarations already suffice (body does not say why it is needed).
  • environments/root.hcl:77 — root local name netbox now maps to vault-secrets-netbox while modules/vault_cluster/modules/netbox_user_management declares netbox = e-breuninger/netbox with its own provider blocks → confirm terragrunt plan shows no provider-source conflict/inheritance mix-up; rename or remove if it does.
  • nit: environments/root.hcl:38 — one-shot import block stays in generated config forever → remove it in a follow-up once applied.
- environments/root.hcl:77 — `netbox` required_providers entry (vault-secrets-netbox) has no matching `provider "netbox" { address = local.vault_addr }` block, unlike every sibling plugin provider here → add the block, or drop the entry if the child modules' own declarations already suffice (body does not say why it is needed). - environments/root.hcl:77 — root local name `netbox` now maps to vault-secrets-netbox while modules/vault_cluster/modules/netbox_user_management declares `netbox` = e-breuninger/netbox with its own provider blocks → confirm `terragrunt plan` shows no provider-source conflict/inheritance mix-up; rename or remove if it does. - nit: environments/root.hcl:38 — one-shot `import` block stays in generated config forever → remove it in a follow-up once applied.
benvin merged commit aef0666da8 into master 2026-11-17 23:06:44 +11:00
benvin deleted branch benvin/netbox-user-mgmt-dynamic 2026-11-17 23:06:44 +11:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/terraform-vault#184