terramate

package module
v0.14.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2025 License: MPL-2.0 Imports: 2 Imported by: 0

README

Terramate

Terramate


Latest Release Go Docs Go Report Card Terramate CI Status Discord Server

🚀 Getting Started | 📖 Documentation | 💻 Playground | 🙌 Join Us



What is Terramate?

Terramate CLI is an open-source orchestration and code generation engine that allows Infrastructure as Code (IaC) such as Terraform, OpenTofu, Terragrunt and Kubernetes to scale.

Terramate CLI can optionally be paired with Terramate Cloud, a fully managed SaaS service that adds additional features to manage and observe all your infrastructure managed with IaC in one or multiple repositories.

With Terramate, you can:

  1. Break up large, monolithic state files into multiple smaller stacks to limit blast radius, reduce runtimes and unlock better collaboration.
  2. Reduce code duplication by programmatically generating native Terraform backend and provider configurations or any other arbitrary files using the Terramate compiler.
  3. Using a graph-based orchestration engine, orchestrate any command such as terraform apply in stacks. Only deploy stacks that contain changes using change detection built on top of Git.
  4. Automate your IaC using pull requests and GitOps workflows that turn your existing CI/CD, such as GitHub Actions, GitLab CI/CD, BitBucket Pipelines, Azure DevOps, etc, into infrastructure vending machines.
  5. Use Terramate Cloud to add observability, drift detection, asset management, misconfiguration detection, incident management, developer self-service with scaffolding, and Slack notifications.

Why Terramate?

Terramate is an extremely lightweight approach that can be onboarded to any existing IaC project with a single command and without touching any existing configurations. Terramate doesn't require access to your state backend, code or cloud accounts, which makes it safe and secure to use in any environment. When you start using Terramate, you can adopt it on a per-feature basis, and there's no additional risk because Terramate doesn't inflict any hard lock-in.

If you want to learn more, take a look at our how it works guide.

Benefits

  • Instant Onboarding: Onboard Terramate to any existing architecture with a single step. No refactoring required.
  • Full Flexibility: Terramate supports any architecture. Workspaces, Directories, Terragrunt, TFVars - we've got you covered.
  • No Lock-in: On- and off-board Terramate at any point in time. No vendor lock-in is inflicted on you.
  • Bring your CI/CD: Terramate isn't a CI/CD platform. Instead, use your existing CI/CD, which is cost-efficient and secure.
  • Unlimited Parallelism: Run highly concurrent workflows that allow teams to collaborate in parallel without causing waiting times.
  • Best Security: No access to your state or cloud accounts is required. Terramate is secure by design.
  • Developer Experience: Remove guesswork and config sprawl by imposing structure, workflows and best practices.
  • Unlimited Integrations: Terramate integrates seamlessly with all your tools, such as GitHub or Slack.
  • Native IaC: No need to learn a new syntax! With Terramate, everything is configured as code using HCL.
  • Serverless: Using Terramate doesn't require you to run and maintain any additional infrastructure.

Installation

Installing Terramate CLI

Start by installing Terramate CLI.

With brew:

brew install terramate

With Go:

go install github.com/terramate-io/terramate/cmd/...@latest

For other installation methods, please see the documentation.

Connect the CLI to Terramate Cloud

To get the most out of Terramate, sign up for a free Terramate Cloud account and connect Terramate CLI with your Terramate Cloud account:

terramate cloud login

Getting Started

Terramate can be onboarded to any existing Terraform, OpenTofu, or Terragrunt with a single command and without requiring any refactoring. For details, please see the following guides:

Features

  • Multiple Environments: Manage multiple environments using any existing approach such as workspaces, directories, Terragrunt, TFVars, partial backend configuration, and more.
  • Dependencies: Manage dependencies among environments with output sharing and graph-based orchestration.
  • Orchestration: Run any command and configurable workflows in stacks with unlimited concurrency.
  • Change Detection: Only execute stacks that contain changes. Allows to detect changes in referenced Terraform and OpenTofu modules as well as Terragrunt dependencies.
  • Code Generation: Generate code such HCL, JSON and YAML to keep your stacks DRY (Don't repeat yourself).
  • Automation Blueprints: Pre-configured GitOps workflows for GitHub Actions, GitLab CI/CD, BitBucket Pipelines and others to enable Pull Automation with plan previews in your existing CI/CD.
  • Drift Management: Detect and reconcile drift with scheduled workflows and post-deployment drift detection.
  • Observability, Visibility and Insights: Provides actionable insights and observability into your stacks, deployments, and resources.
  • Misconfiguration Detection: Detect and remediate misconfigurations with more than 500+ pre-configured policies using frameworks such as the Center of Internet Security Benchmarks (CIS).
  • Asset Management: Get an inventory of all your infrastructure resources managed by multiple teams, environments and repositories.
  • Audit Trail: Track and review all infrastructure changes for compliance and security.
  • Alerts: Manage incidents such as failed deployments or drift with alerts that are automatically assigned to the right teams and individuals.
  • Slack Integrations: Integrate notifications in a centralized Slack channel or via our Slack Bot to directly notify users without causing notification fatigue.
  • Scaffolding: Enable developer-self service by allowing developers to scaffold complex infrastructure configurations without having to know tools such as Terraform or Terramate in detail.

Terramate CLI vs Terramate Cloud

Terramate Platform

Learn more

Join the Community

Reporting Bugs, Requesting Features, or Contributing to Terramate

Want to report a bug or request a feature? Open an issue

Interested in contributing to Terramate? Check out our Contribution Guide

License

See the LICENSE file for licensing information.

Terramate

Terramate is a CNCF and Linux Foundation silver member.

CNCF Silver Member logo

Documentation

Overview

Package terramate provides functions for managing terraform stacks. A stack is a unit of independent runnable terraform modules.

Index

Constants

View Source
const (
	// DefaultFilename is the name of the default Terramate configuration file.
	DefaultFilename = "terramate.tm.hcl"

	// SkipFilename is the name of Terramate skip file.
	SkipFilename = ".tmskip"
)

Variables

This section is empty.

Functions

func Version

func Version() string

Version of terramate.

Types

This section is empty.

Directories

Path Synopsis
benchmarks
changed
Package changed contains benchmarks to the change detection system.
Package changed contains benchmarks to the change detection system.
Package ci provides helper functions to detect the CI/CD platform.
Package ci provides helper functions to detect the CI/CD platform.
Package cloud implements a client SDK for communication with the cloud API.
Package cloud implements a client SDK for communication with the cloud API.
api/deployment
Package deployment provides types and helpers for cloud deployments.
Package deployment provides types and helpers for cloud deployments.
api/drift
Package drift provides types and helpers for cloud drifts.
Package drift provides types and helpers for cloud drifts.
api/metadata
Package metadata contains data structures for platform metadata that is sent to TMC, i.e.
Package metadata contains data structures for platform metadata that is sent to TMC, i.e.
api/preview
Package preview contains functionality for the preview feature in Terramate Cloud.
Package preview contains functionality for the preview feature in Terramate Cloud.
api/resources
Package resources contains the resource entities used in the Terramate Cloud API.
Package resources contains the resource entities used in the Terramate Cloud API.
api/stack
Package stack provides types and helpers for cloud stacks.
Package stack provides types and helpers for cloud stacks.
api/status
Package status provides utilities for parsing Terramate Cloud status filters.
Package status provides utilities for parsing Terramate Cloud status filters.
integrations/bitbucket
Package bitbucket implements the client for Bitbucket Cloud.
Package bitbucket implements the client for Bitbucket Cloud.
integrations/github
Package github implements a client SDK for the Github API.
Package github implements a client SDK for the Github API.
integrations/gitlab
Package gitlab provides a SDK and helpers for the gitlab provider.
Package gitlab provides a SDK and helpers for the gitlab provider.
testserver
Package testserver provides fake Terramate Cloud endpoints for testing purposes.
Package testserver provides fake Terramate Cloud endpoints for testing purposes.
testserver/cloudstore
Package cloudstore provides the in-memory store used by the fake Terramate Cloud server.
Package cloudstore provides the in-memory store used by the fake Terramate Cloud server.
testserver/cmd/testserver command
Package main implements the cloudmock service.
Package main implements the cloudmock service.
Package cloudsync provides helper functions for cloud sync operations.
Package cloudsync provides helper functions for cloud sync operations.
cmd
terramate command
Terramate is a tool for managing multiple Terraform stacks.
Terramate is a tool for managing multiple Terraform stacks.
terramate-ls command
Terramate-ls is a language server.
Terramate-ls is a language server.
tgdeps command
Package main implements tgdeps.
Package main implements tgdeps.
Package commands define all Terramate commands.
Package commands define all Terramate commands.
clone
Package clone provides the clone command.
Package clone provides the clone command.
cloud/drift/show
Package show provides the cloud drift show command.
Package show provides the cloud drift show command.
cloud/info
Package info provides the cloud info command.
Package info provides the cloud info command.
cloud/login
Package login provides login commands.
Package login provides login commands.
completions
Package completions provides the install-completions command.
Package completions provides the install-completions command.
debug/show/generate_origins
Package generateorigins provides the generate-origins command.
Package generateorigins provides the generate-origins command.
debug/show/globals
Package globals provides the debug globals command.
Package globals provides the debug globals command.
debug/show/metadata
Package metadata provides the show-metadata command.
Package metadata provides the show-metadata command.
debug/show/runtime_env
Package runtimeenv provides the show-runtime-env command.
Package runtimeenv provides the show-runtime-env command.
experimental/eval
Package eval provides the "experimental eval" and "experimental partial-eval" commands.
Package eval provides the "experimental eval" and "experimental partial-eval" commands.
experimental/rungraph
Package rungraph provides the run-graph command.
Package rungraph provides the run-graph command.
experimental/vendordownload
Package vendordownload provides the vendor download command.
Package vendordownload provides the vendor download command.
fmt
Package fmt provides the fmt command.
Package fmt provides the fmt command.
generate
Package generate provides the generate command.
Package generate provides the generate command.
requiredversion
Package requiredversion provides the required-version command.
Package requiredversion provides the required-version command.
run
Package run provides the run command.
Package run provides the run command.
script
Package script provides the script command.
Package script provides the script command.
script/info
Package info provides the "script info" command.
Package info provides the "script info" command.
script/list
Package list provides the script list command.
Package list provides the script list command.
script/run
Package run provides the script run command.
Package run provides the script run command.
script/tree
Package tree provides the script tree command.
Package tree provides the script tree command.
stack/create
Package create provides the create stack command.
Package create provides the create stack command.
stack/list
Package list provides the list command.
Package list provides the list command.
trigger
Package trigger provides the trigger command.
Package trigger provides the trigger command.
version
Package version provides the version command.
Package version provides the version command.
Package config provides high level Terramate configuration facilities.
Package config provides high level Terramate configuration facilities.
filter
Package filter provides helpers for filtering objects.
Package filter provides helpers for filtering objects.
tag
Package tag provides helpers for dealing with Terramate tags.
Package tag provides helpers for dealing with Terramate tags.
e2etests
cmd/helper command
helper is a utility command that implements behaviors that are useful when testing terramate run features in a way that reduces dependencies on the environment to run the tests.
helper is a utility command that implements behaviors that are useful when testing terramate run features in a way that reduces dependencies on the environment to run the tests.
internal/runner
Package runner provides helpers for compiling and running the Terramate binary with the intent of doing e2e tests.
Package runner provides helpers for compiling and running the Terramate binary with the intent of doing e2e tests.
Package engine provides the core functionality of Terramate.
Package engine provides the core functionality of Terramate.
Package errors implements the Terramate standard error type.
Package errors implements the Terramate standard error type.
errlog
Package errlog provides functions to log Terramate errors nicely and in a consistent manner.
Package errlog provides functions to log Terramate errors nicely and in a consistent manner.
verbosity
Package verbosity defines the common Terramate error verbosity levels.
Package verbosity defines the common Terramate error verbosity levels.
Package event implements a simple event stream and defines all events generated by different parts of Terramate.
Package event implements a simple event stream and defines all events generated by different parts of Terramate.
Package exit provides standard exit codes for Terramate.
Package exit provides standard exit codes for Terramate.
Package fs provides filesystem related functionality.
Package fs provides filesystem related functionality.
Package generate implements code generation.
Package generate implements code generation.
genfile
Package genfile implements generate_file code generation.
Package genfile implements generate_file code generation.
genhcl
Package genhcl implements generate_hcl code generation.
Package genhcl implements generate_hcl code generation.
report
Package report provides a report of the code generation process.
Package report provides a report of the code generation process.
sharing
Package sharing implements the loading of sharing related blocks.
Package sharing implements the loading of sharing related blocks.
Package git provides a wrapper for the git command line program.
Package git provides a wrapper for the git command line program.
Package globals provides functions for loading globals.
Package globals provides functions for loading globals.
hcl
Package hcl provides parsing functionality for Terramate HCL configuration.
Package hcl provides parsing functionality for Terramate HCL configuration.
ast
Package ast provides low level parsing facilities for HCL configuration.
Package ast provides low level parsing facilities for HCL configuration.
eval
Package eval provides both full and partial evaluation of HCL.
Package eval provides both full and partial evaluation of HCL.
fmt
Package fmt contains functions for formatting hcl config.
Package fmt contains functions for formatting hcl config.
info
Package info provides informational types related to hcl.
Package info provides informational types related to hcl.
Package http provides HTTP helper functions and error types.
Package http provides HTTP helper functions and error types.
Package lets provides parsing and evaluation of lets blocks.
Package lets provides parsing and evaluation of lets blocks.
Package tmls implements a Terramate Language Server (LSP).
Package tmls implements a Terramate Language Server (LSP).
Package mapexpr implements the `map` block as an HCL expression type.
Package mapexpr implements the `map` block as an HCL expression type.
test
Package test implements testcases and test helpers for dealing with map blocks.
Package test implements testcases and test helpers for dealing with map blocks.
Package modvendor provides basic functions and types to support Terraform module vendoring.
Package modvendor provides basic functions and types to support Terraform module vendoring.
download
Package download is responsible for downloading vendored modules.
Package download is responsible for downloading vendored modules.
manifest
Package manifest implements vendor manifest parsing.
Package manifest implements vendor manifest parsing.
Package printer defines funtionality for "printing" text to an io.Writer e.g.
Package printer defines funtionality for "printing" text to an io.Writer e.g.
Package project defines concepts that are related to a Terramate project.
Package project defines concepts that are related to a Terramate project.
run
Package run provides facilities to run commands inside Terramate context and ordering.
Package run provides facilities to run commands inside Terramate context and ordering.
dag
Package dag provides the Directed-Acyclic-Graph (DAG) primitives required by Terramate.
Package dag provides the Directed-Acyclic-Graph (DAG) primitives required by Terramate.
Package safeguard provides types and methods for dealing with safeguards keywords.
Package safeguard provides types and methods for dealing with safeguards keywords.
Package scheduler defines schedulers to execute functions on DAGs based on a specific scheduling strategy.
Package scheduler defines schedulers to execute functions on DAGs based on a specific scheduling strategy.
resource
Package resource defines different concurrent access strategies for resources.
Package resource defines different concurrent access strategies for resources.
Package stack defines all functionality around stacks, like loading, listing all stacks, etc.
Package stack defines all functionality around stacks, like loading, listing all stacks, etc.
trigger
Package trigger provides functionality that help manipulate stacks triggers.
Package trigger provides functionality that help manipulate stacks triggers.
Package stdlib implements the Terramate language functions.
Package stdlib implements the Terramate language functions.
Package strconv provides helper functions for the Go standard strconv package.
Package strconv provides helper functions for the Go standard strconv package.
Package test provides testing routines reused throughout terramate code base.
Package test provides testing routines reused throughout terramate code base.
cloud
Package cloud provides testing helpers for the TMC cloud.
Package cloud provides testing helpers for the TMC cloud.
errors
Package errors provides useful assert functions for handling errors on tests
Package errors provides useful assert functions for handling errors on tests
hclutils
Package hclutils provides test utils related to hcl.
Package hclutils provides test utils related to hcl.
hclutils/info
Package info provides functions useful to create types like info.Range
Package info provides functions useful to create types like info.Range
hclwrite
Package hclwrite aims to provide some facilities making it easier/safer to generate HCL code for testing purposes.
Package hclwrite aims to provide some facilities making it easier/safer to generate HCL code for testing purposes.
hclwrite/hclutils
Package hclutils provides useful functions to build HCL documents.
Package hclutils provides useful functions to build HCL documents.
ls
Package ls provides test utilities used when testing the Terramate Language Server.
Package ls provides test utilities used when testing the Terramate Language Server.
sandbox
Package sandbox provides an easy way to setup isolated terramate projects that can be used on testing, acting like sandboxes.
Package sandbox provides an easy way to setup isolated terramate projects that can be used on testing, acting like sandboxes.
Package tf provides parsing and abstractions specific to Terraform.
Package tf provides parsing and abstractions specific to Terraform.
Package tg implements functions to deal with Terragrunt files.
Package tg implements functions to deal with Terragrunt files.
ui
tui
Package tui provides the Terminal User Interface (TUI) of the CLI.
Package tui provides the Terminal User Interface (TUI) of the CLI.
tui/cliauth
Package cliauth provides the helper functions for loading the Terramate Cloud credentials.
Package cliauth provides the helper functions for loading the Terramate Cloud credentials.
tui/cliconfig
Package cliconfig implements the parser and load of Terramate CLI Configuration files (.terramaterc and terramate.rc).
Package cliconfig implements the parser and load of Terramate CLI Configuration files (.terramaterc and terramate.rc).
tui/clitest
Package clitest provides constants and errors kind reused by the cli implementation and the e2e test infrastructure.
Package clitest provides constants and errors kind reused by the cli implementation and the e2e test infrastructure.
tui/out
Package out provides output functionality, including verboseness level and normal/error messages support.
Package out provides output functionality, including verboseness level and normal/error messages support.
tui/telemetry
Package telemetry provides types and helpers for CLI telemetry.
Package telemetry provides types and helpers for CLI telemetry.
Package versions provide helper functions for version constraint matching.
Package versions provide helper functions for version constraint matching.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL