terramate

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

README

Terramate

Terramate

https://terramate.io
Terramate CLI is an open-source Infrastructure as Code (IaC) orchestration tool that unifies, simplifies, and scales all your infrastructure code, tools, and workflows.


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

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



What is Terramate CLI?

Terramate CLI is an open-source Infrastructure as Code (IaC) orchestration tool for Terraform, OpenTofu, Terragrunt, Pulumi, Cloud Formation, CDK, Azure Resource Manager (ARM), Kubernetes, and others, that unifies, simplifies and scales all your infrastructure code, tools, and workflows.

The main value proposition of Terramate CLI is to simplify the management and improve the scalability of your Infrastructure as Code projects by using a modular and efficient approach called Terramate Stacks.

Quick Install

With brew:

brew install terramate

With Go:

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

Getting Started

The fastest way to get started with Terramate is our getting started guide.

What are Terramate Stacks?

Terramate Stacks are modular, standardized, and tooling-agnostic units that represent a set of infrastructure resources. They are often used to group, organize and manage various isolated components of an application or infrastructure and support technologies such as Terraform, OpenTofu, Terragrunt, CDK, Pulumi, Cloud Formation, Azure Resource Manager (ARM), Kubernetes (Helm, kubectl, Kustomize), and others.

You can think about a stack as a combination of source code, the current state of the managed infrastructure (e.g., Terraform state file), and configuration.

Terramate Stacks Overview

There are several benefits to using Terramate Stacks:

✅ Limit the blast radius and risk of infrastructure changes

✅ Significantly faster run times and lower costs

✅ Better ownership management and governance

✅ Improved productivity and developer experience while reducing complexity

✅ Better observability and security

✅ Enables multi-step and multi-IaC use cases

Terramate Stacks can be cloned, nested, compared and orchestrated. You can also generate code in stacks to keep them DRY (e.g., generate files such as the Terraform backend configuration for all stacks that manage Terraform resources).

Terramate Stacks are created using a single command.

terramate create path/to/new/stack

What is an IaC orchestrator?

An orchestrator allows you to execute commands in stacks while defining the order of execution, dependencies, and more. Terramate CLI comes with a powerful orchestration and execution engine that allows you to easily invoke commands in stacks.

terramate run <CMD>

Terramate CLI also comes with a change detection, that seamlessly integrates with git enabling you to execute commands in stacks that contain changes only.

E.g., invoke terraform apply in all stacks that contain changes:

terramate run --changed -- terraform plan

Another example is to invoke a command in all stacks that have the tags k8sandprd, and that contain changes.

terramate run --changed --tags k8s:prd -- kubectl apply

Terramate CLI is designed and implemented by long-time DevOps, Cloud and Platform Engineering practitioners based on previous experience working with large-scale platforms in some of the most sophisticated companies in the world. It focuses on significantly improving the developer experience and productivity and integrates with existing tooling in a non-intrusive way without major lock-ins and for a broader audience.

If you like Terramate CLI, please give the project a ⭐ and join our Discord Community.

What are the most common use cases of Terramate CLI?

📈 Implement and maintain highly scalable IaC projects

Stacks unlock faster execution, better collaboration, and lower blast radius risk. With stacks, parallel deployment ensures no more pipeline run bottlenecks.

🔗 GitOps workflows that run in your existing CI/CD platform

Unlock CI/CD workflows to orchestrate your stacks in your existing CI/CD platform, such as GitHub Actions, GitLab and Bitbucket Pipelines. Can be used to preview changes and plans in Pull Requests or to detect infrastructure drift with scheduled runs.

🏎 Deploy significantly faster and more often

Change detection allows you to execute only commands in stacks that have been changed in the current branch or since the last merge, reducing CI/CD runtimes to a bare minimum, even in complex environments, saving costs and improving throughput.

👷 Better developer productivity and experience

Simplified management and improved productivity by providing developer-centric workflows like one-click cloning stacks and environments. Enable developers to use templates to deploy complex infrastructure without requiring them to learn the complexity of IaC.

⚒️ Data Sharing

Share data across stacks with globals that can be inherited, merged, or overwritten in your stack hierarchy. Use input and output data from one stack and IaC technology as input data in another.

💫 Code Generation

Keep your code DRY by automatically generating and updating repetitive code, such as the Terraform provider and backend configuration. Always generates native code that integrates seamlessly with third-party tooling.

Terramate Cloud

Terramate Cloud provides you with the best IaC management experience possible. It helps you orchestrate your stacks in your existing CI/CD platform, such as GitHub Actions, GitLab and Bitbucket Pipelines, so you don't need to buy yet another CI/CD vendor.

It also provides a powerful dashboard that adds observability and insights, deployment metrics (e.g., DORA), notifications, drift management, asset management, and more for your stacks to provide the developer experience and infrastructure to build, scale and observe all your infrastructure managed with IaC.

Terramate Cloud Dashboard

Join the Community

Additional Resources

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

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Version of terramate.

Types

This section is empty.

Directories

Path Synopsis
Package cloud implements a client SDK for communication with the cloud API.
Package cloud implements a client SDK for communication with the cloud API.
deployment
Package deployment provides types and helpers for cloud deployments.
Package deployment provides types and helpers for cloud deployments.
drift
Package drift provides types and helpers for cloud drifts.
Package drift provides types and helpers for cloud drifts.
preview
Package preview contains functionality for the preview feature in Terramate Cloud.
Package preview contains functionality for the preview feature in Terramate Cloud.
stack
Package stack provides types and helpers for cloud stacks.
Package stack provides types and helpers for cloud stacks.
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
Package main implements the cloudmock service.
Package main implements the cloudmock service.
cmd
terramate
Terramate is a tool for managing multiple Terraform stacks.
Terramate is a tool for managing multiple Terraform stacks.
terramate-ls
Terramate-ls is a language server.
Terramate-ls is a language server.
terramate/cli
Package cli provides cli specific functionality.
Package cli provides cli specific functionality.
terramate/cli/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).
terramate/cli/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.
terramate/cli/github
Package github implements a client SDK for the Github API.
Package github implements a client SDK for the Github API.
terramate/cli/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.
terramate/e2etests/cmd/helper
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.
terramate/e2etests/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.
tgdeps
Package main implements tgdeps.
Package main implements tgdeps.
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.
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.
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 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.
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 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.
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