All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This Solution adheres to the principles of Semantic Versioning.
Given a version number MAJOR.MINOR.PATCH
, we increment the:
MAJOR
version when we make incompatible changes,MINOR
version when we add functionality in a backward compatible manner, andPATCH
version when we make backward compatible bug fixes.
- Backward compatibility in versions
0.0.z
is not guaranteed whenz
is increased. - Backward compatibility in versions
0.y.z
is not guaranteed wheny
is increased.
- Add support for
[for ...]
and{for ...}
expressions containing Terramate variables and functions inside thegenerate_hcl.content
block. - Add experimental support for deployment targets. This allows to keep separate stack information when the same stacks are deployed to multiple environments, i.e. production and staging.
- Can be enabled with
terramate.config.experiments = ["targets"]
andterramate.config.cloud.targets.enabled = true
. - Once enabled, commands that synchronize or read stack information to Terramate Cloud require a
--target <target_id>
parameter. These include:terramate run --sync-deployment/--sync-drift-status/--sync-preview
terramate script run
terramate run --status
terramate list --status
terramate cloud drift show
- Can be enabled with
- Add
script.lets
block for declaring variables that are local to the script. - Add
--ignore-change
flag toterramate experimental trigger
, which makes the change detection ignore the given stacks.- It inverts the default trigger behavior.
- Add
--recursive
flag toterramate experimental trigger
for triggering all child stacks of given path.
- Fix
terramate experimental trigger --status
to respect the-C <dir>
flag.- Now using
-C <dir>
(or--chdir <dir>
) only triggers stacks inside the provided dir.
- Now using
- Fix the update of stack status to respect the configured parallelism option and only set stack status to be
running
before the command starts. - Fix
terramate experimental trigger
gives a misleading error message when a stack is not found.
- (BREAKING CHANGE) The format of the generated code may change while being still semantically the same as before. This change is marked as "breaking", because this may trigger change detection on files where the formatting changes.
- Fix limitation preventing
tm_dynamic.attributes
use with map types. - Fix the loading of
terramate.config.run.env
environment variables not considering equal signs in the value.
- Fix potential crash when trying to obtain the pull request metadata associated with a Github repository.
- Add support for Gitlab
id_token
OIDC.- You can connect to Terramate Cloud using Gitlab id_token exported as a
TM_GITLAB_ID_TOKEN
environment variable.
- You can connect to Terramate Cloud using Gitlab id_token exported as a
- Fix issue with handling paginated responses from Github API when retrieving review and GHA action metadata.
- Fix incorrect warning emitted by the parser in the case
terramate.config.run.env
is defined outside project root.
- Add support for hierarchical configuration of the stack run-time environment variables.
- The
terramate.config.run.env
declared closer to the stack has precedence over declarations in parent directories.
- The
- Full support for OpenTofu plan files when synchronizing deployments, drifts or previews to Terramate Cloud:
- Add CLI option
--tofu-plan-file=FILE
- Add Terramate Scripts command option
tofu_plan_file = FILE
- Add CLI option
- (BREAKING CHANGE) Use
terramate.required_version
to detect project root if git is absent.- This is only a breaking change for projects not using
git
.
- This is only a breaking change for projects not using
- Issue a test-only release that includes everything that was published in v0.6.5
- Add
terramate.config.change_detection.terragrunt.enabled
attribute. It supports the values below:auto
(default): Automatically detects if Terragrunt is being used and enables change detection if needed.force
: Enables Terragrunt change detection even if no Terragrunt file is detected in any stack.off
: Disables Terragrunt change detection.
- Fix a performance regression in repositories having a lot of stacks.
- Fix
terramate fmt --detailed-exit-code
not saving the modified files.
- Fix the
generate_*.inherit=false
case when the blocks are imported and inherited in child stacks.
- Fix remaining naming inconsistencies of some
cloud
script options.- Rename CLI option
--sync-layer
to--layer
- Rename CLI option
--sync-terraform-plan-file
to--terraform-plan-file
- Rename Terramate Script option
sync_layer
tolayer
- Rename Terramate Script option
sync_terraform_plan_file
toterraform_plan_file
- Old flags and command options are still supported as aliases for the new ones.
- Rename CLI option
- Promote Terragrunt integration experiment to stable.
- Please remove
terragrunt
fromterramate.config.experimental
config.
- Please remove
- Add new experiment
tmgen
which allows to generate HCL files in stacks withoutgenerate_hcl
configurations.- Please enable the experiment with
terramate.config.experimental = ["tmgen"]
.
- Please enable the experiment with
- Add
generate_*.inherit
attribute for controlling if generate blocks must be inherited into child stacks. - Add
terramate cloud login --github
for authenticating with the GitHub account. - Add
terramate create --watch
flag for populating thestack.watch
field at stack creation. - Add support for parsing and generating code containing HCL namespaced functions.
- Check HCL Changes for details.
- Rename Terramate Cloud options
- Rename CLI option
--cloud-sync-deployment
to--sync-deployment
- Rename CLI option
--cloud-sync-drift-status
to--sync-drift-status
- Rename CLI option
--cloud-sync-preview
to--sync-preview
- Rename CLI option
--cloud-sync-layer
to--sync-layer
(WARN: fixed in next release to--layer
) - Rename CLI option
--cloud-sync-terraform-plan-file
to--sync-terraform-plan-file
(WARN: fixed in next release to--terraform-plan-file
) - Rename CLI option
--cloud-status
to--status
- Rename Terramate Script option
cloud_sync_deployment
tosync_deployment
- Rename Terramate Script option
cloud_sync_drift-status
tosync_drift_status
- Rename Terramate Script option
cloud_sync_preview
tosync_preview
- Rename Terramate Script option
cloud_sync_layer
tosync_layer
(WARN: fixed in next release tolayer
) - Rename Terramate Script option
cloud_sync_terraform_plan_file
tosync_terraform_plan_file
(WARN: fixed in next release toterraform_plan_file
) - Rename Terramate Script option
cloud_status
tostatus
- Old flags and command options are still supported as aliases for the new ones.
- Rename CLI option
- Fix a panic in the language server when editing a file outside a repository.
- (BREAKING CHANGE) Enable change detection for dotfiles. You can still use
.gitignore
to ignore them (if needed). - Add a new flag
--continue-on-error
toterramate script run
. When the flag is set and a command in a script returns an error:- The script execution will be aborted and no further commands or jobs from that script will be run on the current stack node.
- The script execution will continue to run on the next stack node.
terramate script run
will return exit code 1 (same behavior asterramate run --continue-on-error
).
- Add a new flag
--reverse
toterramate script run
. When the flag is set, the script execution will happen in the reverse order of the selected stacks. This is similar toterramate run --reverse
. - Improve Terragrunt Integration for Terramate Cloud by adding
--terragrunt
flag andterragrunt
script option to useterragrunt
binary to create change details when synchronizing to Terramate Cloud
- Fix a bug in the dotfiles handling in the code generation. Now it's possible to generate files such as
.tflint.hcl
. - Fix the cloning of stacks containing
import
blocks.
- (BREAKING CHANGE) Removes the option
terramate.config.git.default_branch_base_ref
. - (BREAKING CHANGE) The code generation of HCL and plain files was disallowed inside dot directories.
- Add
script.job.name
andscript.job.description
attributes.
- Fix
--cloud-status
flag when stacks were synchronized with uppercase in thestack.id
. - Fix
terramate cloud drift show
when used in stacks containing uppercase in thestack.id
. - Fix
cloud_sync_terraform_plan_file
option for previews in scripts
- Fix an issue that prevented stack previews from being created when using uppercase letters in stack IDs.
- Fix an inconsistency in
stack.id
case-sensitivity when--cloud-sync-*
flags are used.
- Add Terragrunt change detection.
- Terramate understands the structure of
terragrunt.hcl
files and detects changes if any other Terragrunt referenced file changes (dependency
,dependencies
andinclude
blocks, function calls likefind_in_parent_folders()
,read_terragrunt_config()
).
- Terramate understands the structure of
- Add
before
andafter
configuration to Terragrunt stacks created byterramate create --all-terragrunt
.
Important
When using nested stacks and tags in before
and after
the order of execution was wrong.
This is now fixed but but can lead to a change in the order of execution in some rare cases.
Please check the terramate list --run-order
after upgrading to ensure you run stacks in the correct order.
- Add
terramate.config.generate.hcl_magic_header_comment_style
option to change the comment style for magic headers to#
instead of//
- Add support for formatting single files or stdin with
terramate fmt
- Add support for
--cloud-status
filter toterramate run
- Add support for
--cloud-status
filter toterramate script run
- Add support to synchronize previews to Terramate Cloud via new
terramate run --cloud-sync-preview
- Add
script.name
attribute.- The commands
terramate script info
,terramate script list
andterramate script tree
were updated to show the script name (when available).
- The commands
- Improve user experience when using Terramate with existing Terragrunt projects.
- Add
terramate create --all-terragrunt
option, which will automatically create Terramate stacks for each Terraform module.
- Add
- Allow to run independent stacks in parallel for faster deployments and better utilization of system resources in general.
- Add
--parallel=N
(short-j N
) option toterramate run
andterramate script run
to allow running up toN
stacks in parallel. - Ordering constraints between stacks are still respected, i.e.
before
/after
, parent before sub-folders.
- Add
- Add
cloud_sync_drift_status
option toscript
block commands. It allows for synchronizing the stack drift details from script jobs. - Add --cloud-sync-layer to allow users to specify a preview layer, e.g.:
stg
,prod
etc.- This is useful when users want to preview changes in a specific terraform workspace.
- Add
--cloud-sync-layer
and--cloud-sync-preview
toscript
block, this would allow users to synchronize previews to Terramate Cloud via script jobs.
- Fix a panic in language server with a project containing errors on root directory
- Fix the execution order when using
tag
filter inafter/before
in conjunction with implicit order for nested stacks. (BREAKING CHANGE) - Fix escape sequences being interpreted in heredocs (issue #1449)
- Use
repository
filter when listing Terramate Cloud stacks.- It makes the
--cloud-status=<status>
flag faster and potentially less brittle for cases where other repositories have issues.
- It makes the
-
Add support for
stack_filter
blocks ingenerate_file
blocks -
Add
list --run-order
flag to list stacks in the order of execution -
Add support for
terramate
in linting, pre-commit and test environments-
Add
--detailed-exit-code
toterramate fmt
andterramate generate
commands:- An exit code of
0
represents successful execution and no changes made - An exit code of
1
represents the error state, something went wrong - An exit code of
2
represents successful execution but changes were made
- An exit code of
-
-
Refactor Safeguards
- Add
disable_safeguards
configuration and--disable-safeguards
CLI option with possible valuesall
Disable ALL safeguards (use with care)none
Enable ALL safeguardsgit
Disable all git related safeguards:git-untracked
Disable Safeguard that checks for untracked filesgit-uncommitted
Disable Safeguard that checks for uncomitted filesgit-out-of-sync
Disable Safeguard that checks for being in sync with remote git
outdated-code
Disable Safeguard that checks for outdated code
- Add
-
Promote cloud commands from
experimental
terramate cloud login
terramate cloud info
terramate cloud drift show
-
Improve support for synchronization of deployments to Terramate Cloud
- Add
cloud_sync_deployment
flag to Terramate Scripts Commands - Add
cloud_sync_terraform_plan_file
flag to Terramate Scripts Commands when synchronizing deployments. - Add
--cloud-sync-terraform-plan-file
support toterramate run
when synchronizing deployments.
- Add
-
Promote
--experimental-status
flag to--cloud-status
flag interramate experimental trigger
terramate list
- Fix a performance issue in
tm_dynamic.attributes
configuration - Fix order of execution in
terramate script run
- Fix a type issue when assigning lists to
script.job.command[s]
- Deprecate old safeguard configuration options and issue a warning when used.
-
Add
terramate.config.experiments
configuration to enable experimental features -
Add support for statuses
ok
,failed
,drifted
, andhealthy
to the--experimental-status
flag -
Add experimental
script
configuration block- Add
terramate script list
to list scripts visible in current directory - Add
terramate script tree
to show a tree view of scripts visible in current directory - Add
terramate script info <scriptname>
to show details about a script - Add
terramate script run <scriptname>
to run a script in all relevant stacks
- Add
-
Add
stack_filter
block togenerate_hcl
for path-based conditional generation. -
Promote experimental commands
terramate debug show metadata
terramate debug show globals
terramate debug show generate-origins
terramate debug show runtime-env
-
Improve the output of
list
,run
andcreate
commands.
- Fix an issue where
generate_file
blocks withcontext=root
were ignored when defined in stacks - Fix
experimental eval/partial-eval/get-config-value
to not interpret the output as a formatter - Fix an issue where change detector cannot read global/user git config
- Add
--cloud-sync-terraform-plan-file
flag for synchronizing the plan file in rendered ASCII and JSON (sensitive information removed). - Add configuration attribute
terramate.config.cloud.organization
to select which cloud organization to use when syncing with Terramate Cloud. - Add sync of logs to Terramate Cloud when using
--cloud-sync-deployment
flag. - Add
terramate experimental cloud drift show
for retrieving drift details from Terramate Cloud. - Add support for cloning nested stacks to
terramate experimental clone
. It can also be used to clone directories that are not stacks themselves, but contain stacks in sub-directories.
- Improve diagnostic messages on various errors
- Add
--cloud-sync-drift-status
flag for syncing the status of drift detection to the Terramate Cloud.
- Ensure that SIGINT aborts the execution of subsequent stacks in all cases.
- Remove non-supported functions (
tm_sensitive
andtm_nonsensitive
)
- Add support for globs in the
import.source
attribute to import multiple files at once. - Add support for listing
unhealthy
stacks withterramate list --experimental-status=unhealthy
. - Add support for triggering
unhealthy
stacks withterramate experimental trigger --experimental-status=unhealthy
. - Add support for evaluating
terramate run
arguments with the--eval
flag.
- Allow to specify multiple tags separated by a comma when using
terramate create --tags
command. - Fix inconsistent behavior in
terramate create
vs.terramate create --all-terraform
, both now populate the name/description fields the same way.
- Introduce the
terramate create --all-terraform
command that can be used to initialize plain terraform projects easily with a Terramate Stack configuration. Every directory containing Terraform Files that configure either aterraform.backend {}
block or aprovider {}
block will be initialized. - Introduce
terramate create --ensure-stack-ids
to add a UUID as stack ID wherestack.id
is not set. (Promoted fromexperimental ensure-stack-id
)
- BREAKING CHANGE: Make
stack.id
case insensitive. If you used case to identify different stacks, the stack ID need to be adjusted. If you use the recommended UUIDs nothing has to be done. - Distribute the Terramate Language Server
terramate-ls
alongsideterramate
to be able to pick up changes faster for IDEs.
- Introduce the
terramate experimental cloud info
command. - Introduce the
--cloud-sync-deployment
flag (experimental). - Introduce the
terramate experimental ensure-stack-id
command.
- Fix a crash when
generate_hcl {}
has nocontent {}
block defined.
- Add the
terramate experimental cloud login
command.
- Fix a file descriptor leak when loading the configuration tree.