finds.dev

gavinbunney/terraform-provider-kubectl

Terraform provider to handle raw kubernetes manifest yaml files

View on GitHubHomepage ↗

★ 690GoMPL-2.0updated Apr 2025

// the take

A Terraform provider built around one resource, `kubectl_manifest`, that applies arbitrary Kubernetes YAML instead of requiring a typed Terraform resource for every object or CRD. It's for teams managing CRDs or vendor manifests that the official Kubernetes/Helm providers don't model well, and who are willing to trade typed schemas for flexibility.

`kubectl_manifest` does real drift detection on refresh, not a fire-and-forget apply, so out-of-band kubectl edits actually surface in a later `terraform plan`. The data sources (`kubectl_path_documents`, `kubectl_kustomize_documents`, `kubectl_file_documents`) correctly split multi-document YAML files and consume kustomize output, which the official `kubernetes_manifest` resource still handles poorly. Tests run against a real k3s cluster (apply/refresh/plan loop per test file) rather than being pure unit tests, which is the right call for something whose entire job is talking to a live API server.

Because the resource is a raw YAML string, `terraform plan` output collapses to 'yaml_body changed' instead of a field-level diff - you lose most of the review value plan normally gives you. There's no schema validation against the cluster API at plan time, so a typo'd field name only shows up as an apply-time rejection from Kubernetes itself. The contribution bar is high: the README admits acceptance tests spin up real resources and 'often cost money to run,' on top of requiring a local k3s setup. It also reads as effectively a single-maintainer project with a sparse recent commit history (last push April 2025) for something sitting in the critical path of cluster provisioning.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
690
Forks
112
Language
Go
License
MPL-2.0
Last commit
16 Apr 2025

// nearby

If terraform-provider-kubectl isn't quite it.

All repos →