Experiments
Terragrunt supports operating in a mode referred to as “Experiment Mode”.
Experiment Mode is a set of controls that can be enabled to opt in to experimental features before they’re stable. These features are subject to change and may be removed or altered at any time. They generally provide early access to new features or changes that are being considered for inclusion in future releases.
Those experiments will be documented here so that you know the following:
- What the experiment is.
- What the experiment does.
- How to provide feedback on the experiment.
- What criteria must be met for the experiment to be considered stable.
Sometimes, the criteria for an experiment to be considered stable is unknown, as there may not be a clear path to stabilization. In that case, this will be noted in the experiment documentation, and collaboration with the community will be encouraged to help determine the future of the experiment.
Controlling Experiment Mode
Section titled “Controlling Experiment Mode”The simplest way to enable experiment mode is to set the experiment-mode flag.
This will enable experiment mode for all Terragrunt commands, for all experiments (note that this isn’t generally recommended, unless you are following Terragrunt development closely and are prepared for the possibility of breaking changes).
terragrunt plan --experiment-modeYou can also use the environment variable, which can be more useful in CI/CD pipelines:
TG_EXPERIMENT_MODE='true' terragrunt planInstead of enabling experiment mode, you can also enable specific experiments by setting the experiment flag to a value that’s specific to an experiment. This can allow you to experiment with a specific unstable feature that you think might be useful to you.
terragrunt plan --experiment symlinksAgain, you can also use the environment variable, which can be more useful in CI/CD pipelines:
TG_EXPERIMENT='symlinks' terragrunt planYou can also enable multiple experiments at once.
terragrunt --experiment symlinks planIncluding the environment variable:
TG_EXPERIMENT='symlinks,stacks' terragrunt plan