terrateamio / terrateam

Terrateam is an open-source GitOps CI/CD platform for automating infrastructure workflows. It integrates with GitHub to orchestrate Terraform, OpenTofu, CDKTF, and Terragrunt operations via pull requests.
https://terrateam.io
Mozilla Public License 2.0
121 stars 3 forks source link
automation cloud-management devops github-actions infrastructure-as-code infrastructure-automation infrastructure-orchestration ocaml opentofu tacos terraform terraform-github-actions
Terrateam

Stars Join our Slack Latest Release OCaml License: MPL-2.0

Terrateam

Terrateam is an open-source GitOps CI/CD platform for automating infrastructure workflows. It integrates with GitHub to orchestrate Terraform, OpenTofu, CDKTF, and Terragrunt operations via pull requests. Use our hosted service or run on-premise.

Why Terrateam

True GitOps

Every part of your Terrateam configuration lives directly in Git, right alongside your code. Branch, merge, and revert configurations exactly like code, with no external setup or separate configuration files. This ensures full version control, traceability, and seamless integration with your existing Git workflows.

Built for Scale and Reliability

Terrateam combines powerful GitOps automation with enterprise-ready security and scalability, all directly in GitHub.


Getting Started

Terrateam SaaS

Get started quickly with our free SaaS version by signing up at https://terrateam.io.

Self-Hosted Deployment

For those who prefer more control, you can deploy Terrateam in your own environment.

Local Setup with Docker Compose

Prerequisites

Before you begin, ensure you have the following:

Terrateam Setup Steps

  1. Clone the terrateamio/terrateam repository:

    git clone https://github.com/terrateamio/terrateam.git
    cd terrateam/docker/terrat
  2. Start the Terrateam setup container:

    GH_ORG=YOUR_GITHUB_ORG docker-compose up setup
  3. Navigate to http://localhost:3000 to create your private Terrateam GitHub application. Take note of your application URL for use below.

    ⚠️ Important: Do not install your private Terrateam GitHub application until you complete the steps below.

  4. Save the generated GitHub application settings Create a .env file in the terrateam/docker/terrat directory, next to the docker-compose.yml file, and save the settings there.

  5. Stop the Terrateam setup container by pressing Ctrl+C in the terminal to stop the container.

  6. Start the Terrateam Server: Get your Ngrok auth token here

    NGROK_AUTHTOKEN=<YOUR-NGROK-AUTH-TOKEN> docker-compose up server -d
  7. Wait for the server to be ready. The docker-compose command will return you to your shell when the Terrateam Server is ready for connections.

  8. Install your private Terrateam GitHub application using the application URL from step 3. You can install Terrateam aginst your entire organization or specific repositories.

    ⚠️ Important: Ensure the Terrateam Server is running (see step 7) before installing the GitHub application.

  9. Add the Terrateam GitHub Actions Workflow Download terrateam.yml and save it in your repository under .github/workflows/terrateam.yml. The Terrateam GitHub Actions workflow file must reside in the default branch of your Terraform repository, typically named main or master.

  10. Start Using Terrateam Create a pull request with a Terraform code change to automatically trigger a Terraform Plan operation. For detailed instructions on your first Terrateam deployment, refer to the Quickstart Guide.

For non-local setup instructions, including manual setup and Kubernetes deployment options, follow our Self-Hosted Guide to get up and running.


Features


Architecture Overview

Terrateam’s architecture is built for high availability and reliability.

graph TD
    gpr[GitHub Pull Request] --> ge[GitHub Events]
    ge --> ts[Terrateam Server]
    ts <--> pd[(Postgres Database)]
    ts <--> ga[GitHub Actions]
    ts --> gpr
    gt[GitHub Teams] --> ts
    ga <--> go[GitHub OIDC]
    gs[GitHub Secrets] --> ga
    ga --> cp[Cloud Provider]
    tr[Terraform Code Repository] --> ga

For more details, see our How It Works Documentation.

Configuration

Terrateam’s configuration is managed in an in-repo .terrateam/config.yml file, providing flexibility for custom workflows and advanced settings. You can also dynamically generate configurations using the config_builder for even more control.

For more details and example configurations, explore the Configuration Reference and Advanced Workflows sections of our documentation to customize Terrateam to your specific use cases.

Resources


Contributing

Thank you for your interest in contributing to Terrateam! We appreciate your help in improving the project. Whether you're fixing bugs, suggesting new features, or improving documentation, your contributions are essential to making Terrateam better for everyone.

🌟 If you find Terrateam useful, starring the repo is always appreciated! Your support helps increase the project’s visibility, allowing us to grow and continue improving Terrateam for the community.

Ways to Contribute

Please refer to the Contributing Guide for detailed steps on how to contribute and what to expect during the review process.

Community Support

If you'd like to engage with the community or need help, you're welcome to participate in GitHub Discussions or join our Slack Community. We'd love to hear your feedback, ideas, and questions.

Thank you for being a part of the Terrateam community and helping us make it better!

Open-Source vs. Paid

Terrateam is available in two versions:

Category Feature Open-Source (MPL-2.0) Enterprise (Proprietary)
Core Features Plan & Apply Operations :white_check_mark: :white_check_mark:
Apply Before / After Merge :white_check_mark: :white_check_mark:
Layered Runs (Dependencies) :white_check_mark: :white_check_mark:
Drift Detection & Reconciliation :white_check_mark: :white_check_mark:
Cost Estimation :white_check_mark: :white_check_mark:
Scalability High Availability :white_check_mark: :white_check_mark:
Unlimited Concurrency :white_check_mark: :white_check_mark:
Private Runners :white_check_mark: :white_check_mark:
Integrations GitHub Environments Support :white_check_mark: :white_check_mark:
GitHub Secrets Integration :white_check_mark: :white_check_mark:
OPA, Checkov, and more :white_check_mark: :white_check_mark:
Advanced Features Centralized Configuration :heavy_minus_sign: :white_check_mark:
Dynamic Configuration Builder :white_check_mark: :white_check_mark:
Security & Compliance Fine-Grained Apply Requirements :white_check_mark: :white_check_mark:
OIDC Authentication :white_check_mark: :white_check_mark:
Role-Based Access Control (RBAC) :heavy_minus_sign: :white_check_mark:
Audit Trail UI :heavy_minus_sign: :white_check_mark:

Both versions include essential automation features, but the Enterprise Edition offers additional capabilities that help manage larger infrastructures, provide more granular control, and ensure security and compliance at scale.


License

This repository uses a multi-license model:

Please refer to the individual LICENSE files within each directory for more details.