-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ will occur. | |
|
||
Project-wide configuration can be defined in this block. All possible settings are described in the following subsections. | ||
|
||
<a id="the-terramateconfiggit-block"></a> | ||
### The `terramate.config.git` block | ||
|
||
[Git integration](../change-detection/integrations/git.md) related configurations used in the | ||
|
@@ -92,6 +93,7 @@ terramate { | |
} | ||
``` | ||
|
||
<a id="the-terramateconfiggenerate-block"></a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here? we don't need this? |
||
### The `terramate.config.generate` block | ||
|
||
The `terramate.config.generate` block can be used to configure the code generate feature. | ||
|
@@ -112,6 +114,7 @@ terramate { | |
The config above will make Terramate generate files using `#` as comment style. | ||
The only valid options are `//` and `#`. | ||
|
||
<a id="the-terramateconfigrun-block"></a> | ||
### The `terramate.config.run` Block | ||
|
||
Configuration for the `terramate run` command can be set in the `terramate.config.run` block. | ||
|
@@ -200,6 +203,7 @@ on `terramate.config.run.env` blocks won't affect the `env` namespace. | |
You can have multiple `terramate.config.run.env` blocks defined on different | ||
files, but variable names **cannot** be defined twice. | ||
|
||
<a id="the-terramateconfigcloud-block"></a> | ||
### The `terramate.config.cloud` block | ||
|
||
Properties related to Terramate Cloud can be defined inside the `terramate.config.cloud` block. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 in the project's root. The `terramate` block is defined in the `terramate.tm.hcl` file and overrides any defaults by Terramate. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For correctness, the |
||
|
||
## Arguments | ||
|
||
- `required_version`: specify the Terramate version to be used inside a project. More details about this attribute are [here](../../projects/configuration.md#the-terramaterequired_version-attribute). | ||
- `config`: define project-wide configurations in this block. | ||
- `config.git`: [configure](../../projects/configuration.md#the-terramateconfiggit-block) git integration | ||
- `config.generate`: [configure](../../projects/configuration.md#the-terramateconfiggenerate-block) code generation feature | ||
- `config.run`: [configure](../../projects/configuration.md#the-terramateconfiggenerate-block) the `terramate run` command or set environment variables for it | ||
- `config.cloud`: [configure](../../projects/configuration.md#the-terramateconfigcloud-block) the default Terramate Cloud organization name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cloud is the block, the |
||
|
||
## 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 = "# or //" | ||
} | ||
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation seems off here |
||
} | ||
} | ||
cloud { | ||
organization = "cloud-org-name" | ||
} | ||
} | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding those @AnnuCode ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the heading includes an inline code, I had to add an anchor tag to link to that heading in another markdown file. Without this, the generated heading removed hyphens and couldn't link to the correct section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not correct ... e.g. the following link works and jumps directly to the right headline: https://terramate.io/docs/cli/reference/variables/metadata#stack-metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g.
should work.. the
<a>
element shouldn't be required at all. we don't use it anywhereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, I've corrected the section links. Thanks!