Skip to content

feat: Coderd Crossplane Provider #354

Description

@michvllni

Summary

It would be great to have a Crossplane provider that wraps this Terraform provider, so that Coder resources can be managed declaratively from within Kubernetes.

Motivation

Today, managing Coder infrastructure (templates, template versions, users, groups, organizations, etc.) requires running Terraform as a separate step in the toolchain. For teams that already run their platform on Kubernetes and use GitOps (e.g. Flux/ArgoCD), this means context-switching between tools and reconciliation models.

A Crossplane provider would allow Coder and its data plane to be defined entirely as Kubernetes custom resources, continuously reconciled by Crossplane — no separate terraform apply pipeline required. This makes it possible to manage Coder the same way as the rest of the platform, all from a single control plane.

Proposed approach

Crossplane has first-class tooling for generating providers directly from existing Terraform providers:

  • Upjet — Crossplane's code-generation framework that builds a native Crossplane provider from a Terraform provider's schema, mapping each Terraform resource to a Crossplane Managed Resource (CRD).

Because this repo is already a maintained Terraform provider with a well-defined schema, generating an Upjet-based Crossplane provider should be relatively straightforward and largely automated — the heavy lifting (CRD generation, controller scaffolding, Terraform invocation under the hood) is handled by Upjet. The main work tends to be:

  1. Scaffolding the Upjet provider repo against this provider.
  2. Configuring resource grouping / external-name conventions.
  3. Handling provider configuration & credentials (Coder URL + token) via a ProviderConfig.
  4. CI for regenerating when the underlying Terraform provider updates.

Benefits

  • Complete, declarative management of Coder and the data plane directly from Kubernetes.
  • Native GitOps support without bolting Terraform into the pipeline.
  • Single reconciliation model and toolchain for platform teams already on Crossplane.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions