
- Use Terraform to provision long-lived, high-risk, or organization-level resources (cloud accounts, VPCs, clusters, IAM policies).
- Install and configure Crossplane in the Kubernetes clusters Terraform creates.
- Let application teams request and manage per-service resources (databases, buckets, caches) with Crossplane YAML manifests, typically tracked with GitOps.
- Terraform creates the cloud foundation and the Kubernetes cluster, then deploys Crossplane into that cluster.
- Developers commit small Crossplane resource YAMLs (often ~10 lines) to request databases, buckets, etc.
- Crossplane reconciles those resources continuously and remediates any manual drift.
Every resource must be declared and managed in exactly one system: Terraform (outside the cluster) or Crossplane (inside the cluster). Never declare the same resource in both places.
How Crossplane uses Terraform-created resources
When Terraform creates infrastructure, cloud providers return identifiers (for example, a VPC ID). Crossplane needs those identifiers to provision resources (for example, a database in the same network). Common patterns to pass values from Terraform to Crossplane include:
- Write Terraform outputs to a small config that the cluster can read.
- Have Terraform create Kubernetes Secrets/ConfigMaps (or use the Kubernetes provider) with the needed IDs.
- Use a bootstrap job or Helm values (installed by Terraform) to seed Crossplane provider configurations with the correct references.
- Declare each resource in exactly one system (Terraform or Crossplane).
- Keep Terraform for infra that requires human review, audit, and slow change cycles.
- Keep Crossplane for developer-facing, frequently created resources that benefit from GitOps and continuous reconciliation.
- Use Terraform outputs or cluster-accessible secrets to pass provider/resource identifiers into Crossplane.
- Automate Crossplane installation as the final step of Terraform’s cluster provisioning.
- Terraform documentation: https://www.terraform.io/docs
- Crossplane documentation: https://crossplane.io/docs
- GitOps practices for Kubernetes: https://www.weave.works/technologies/gitops
- Use Terraform to build the cloud backbone and install Crossplane.
- Use Crossplane inside Kubernetes for application teams to request and manage cloud resources via YAML and GitOps.
- Never manage the same resource with both tools — choose one system per resource and stick to it. This keeps workflows efficient, avoids contention, and lets each tool play to its strengths in production.