GitHub - crossplane/upjet: A code generation framework and runtime for Crossplane providers (original) (raw)

Upjet - Generate Crossplane Providers from any Terraform Provider

CI GitHub release Go Report Card Contributors Slack X (formerly Twitter) Follow

Upjet is a code generation framework and Kubernetes controller runtime that transforms Terraform providers into Crossplane providers. It generates Kubernetes CRDs, reconciliation controllers, and example manifests while providing runtime libraries for API conversions, Terraform state management, and resource lifecycle operations. It powers the official AWS, Azure, and GCP providers along with 50+ community providers.

Upjet overview

Table of Contents

Key Features

When to Use Upjet

Upjet is ideal when:

Consider a native Crossplane provider when:

Architecture

Upjet bridges the gap between Terraform's vast provider ecosystem and Kubernetes-native infrastructure management. At build time, Upjet reads a Terraform provider's schema and generates everything needed for a Crossplane provider: Go types, Custom Resource Definitions, and reconciliation controllers. At runtime, these controllers use Terraform's resource logic to manage infrastructure, while exposing a pure Kubernetes API to users.

Upjet components

  1. Code Generation Pipeline - Transforms Terraform schemas into Go types, CRDs, and controllers
  2. Generic CR Reconcilers - Runtimes that handle reconciliation for all generated resources
  3. Documentation Scraper - Extracts and generates API documentation, example manifests (used for e2e testing and documentation), cross-resource references, etc. from Terraform docs
  4. Migration Framework - Supports migrating resources between different providers of the same external API, like migrating from the community AWS provider (crossplane-contrib/provider-aws) to the official provider (upbound/provider-aws)
  5. API Conversion Framework - Handles lifecycle management and breaking changes between API versions of the same CRD
  6. Resource Configuration Framework - Implements various configuration aspects (external name, sync/async behavior, API naming, API versions, cross-resource references, etc.) for Upjet resources

Providers Built with Upjet

Major Cloud Providers

Additional Providers

Browse the Upbound Marketplace for a full list of available providers.

Documentation

Guide Description
Generating a Provider Create a new Crossplane provider from scratch
Configuring a Resource External names, references, and resource customization
Adding New Resources Add resources to an existing provider
Testing with Uptest End-to-end testing framework
Monitoring Prometheus metrics for the Upjet runtime
Upgrading to v2 Migration guide from Upjet v1 to v2
Managing CRD Versions Handle Terraform schema changes across versions
Controller Template Variables Variables available to the managed resource controller setup template
Main Template Variables Variables available to the provider family main program template

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Community

Prior Art

Upjet originates from the Terrajet project. See the originaldesign document.

License

Upjet is under the Apache 2.0 license with notice.