// the find
gavinbunney/terraform-provider-kubectl
Terraform provider to handle raw kubernetes manifest yaml files
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.