Terraform/OpenTofu provider covering all hub configuration issue #250
open andymccall opened this · 0 comments
andymccall
Configure everything in OxygenHub with Terraform/OpenTofu: users, organisations, repositories, permissions, labels, boards, webhooks, Flow settings and site configuration. You could then stand up a whole instance with one apply.
Why: scripting forge configuration (e.g. GitLab) is fragile. GitLab's provider has two problems: its API does not cover everything, and the provider is maintained apart from the forge, so it lags.
Approach:
API first. Every setting must be readable and writable over the API, with stable IDs, so plan, apply and import all work. Audit the API for anything only the web UI can change; those gaps are worth closing anyway.
In step with the API. The provider lives with the hub, generated from (or checked against) the API schema. CI fails when an API resource has no provider resource, so coverage is guaranteed.
Bootstrap. Terraform cannot create the first admin. The site token in hub.toml covers a fresh instance.
Publishing. Published for both OpenTofu and Terraform (probably Go, the standard for providers).
Configure everything in OxygenHub with Terraform/OpenTofu: users, organisations, repositories, permissions, labels, boards, webhooks, Flow settings and site configuration. You could then stand up a whole instance with one apply.
Why: scripting forge configuration (e.g. GitLab) is fragile. GitLab's provider has two problems: its API does not cover everything, and the provider is maintained apart from the forge, so it lags.
Approach:
hub.tomlcovers a fresh instance.Low priority: after the core work.