Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adding terramate-block #62

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions cli/reference/blocks/terramate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,46 @@ description: Learn how to configure a Terramate project using the terramate bloc
---

# The `terramate` block

Use the `terramate` block to define project-wide configurations. The `terramate` block is usually defined in the `terramate.tm.hcl` file(or any file of your choice at the project's root) and overrides any defaults by Terramate.

## Arguments

- `required_version`: specify the Terramate version to be used inside a project. More details about this attribute are [here](../../projects/configuration.md#the-terramate-required_version-attribute).
- `config`: define project-wide configurations in this block.
- `config.git`: [configure](../../projects/configuration.md#the-terramate-config-git-block) git integration
- `config.generate`: [configure](../../projects/configuration.md#the-terramate-config-generate-block) code generation feature
- `config.run`: [configure](../../projects/configuration.md#the-terramate-config-generate-block) the `terramate run` command or set environment variables for it
- `config.cloud`: [configure](../../projects/configuration.md#the-terramate-config-cloud-block) the default Terramate Cloud organization name

## Syntax

```hcl
terramate {
required_version = "terramate-version"
config {
git {
# Git configuration
default_remote = "origin"
default_branch = "main"

# Safeguard
check_untracked = false # Deprecated as of v0.4.5 (use terramate.config.disable_safeguards instead)
check_uncommitted = false # Deprecated as of v0.4.5 (use terramate.config.disable_safeguards instead)
check_remote = false # Deprecated as of v0.4.5 (use terramate.config.disable_safeguards instead)
}
generate {
hcl_magic_header_comment_style = "#"
}
run {
check_gen_code = false # Deprecated as of v0.4.5 (use terramate.config.disable_safeguards instead)
env {
TF_PLUGIN_CACHE_DIR = "/some/path/etc"
}
}
cloud {
organization = "cloud-org-name"
}
}
}
```