Terragrunt is a thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules.
MIT License
Bot releases are hidden (Show)
Published by yorinasub17 almost 3 years ago
--terragrunt-option=value
.Published by yorinasub17 almost 3 years ago
prevent_destroy
apply -destroy
as a destroy operation, so it was not taking into account the prevent_destroy
flag.Special thanks to @denis256 for their contribution!
Published by yorinasub17 almost 3 years ago
run-all
--terragrunt-modules-that-include
[NEW OPTION]--terragrunt-modules-that-include
for run-all
command which will restrict the run-all
stack set to only those modules that include the given configuration file. This is useful for driving CI/CD workloads based on updates to common files that are included in child configurations.Published by yorinasub17 almost 3 years ago
dependency
dependencies
include
config_path
when the dependency
block was redefined in the child.Special thanks to @denis256 for their contribution!
Published by yorinasub17 almost 3 years ago
terraform.source
tfr
source did not handle registries that returned absolute URLs.source
attribute of the terraform
block.Special thanks to @denis256 for their contribution!
Published by yorinasub17 almost 3 years ago
include
Warning logs about partial parsing of included configurations have been converted to debug level.
Published by yorinasub17 almost 3 years ago
destroy
Terragrunt will now log parsing errors during the dependency detection phase for destroy
at the debug level.
Special thanks to @denis256 for their contribution!
Published by yorinasub17 about 3 years ago
run-all
Terragrunt will now log the order in which modules are deployed when using run-all
, instead of all the modules in the graph including those that are excluded. You can get the old format logs if you use --terragrunt-log-level debug
.
%~> tree .
.
├── account-baseline
│ ├── main.tf
│ └── terragrunt.hcl
└── services
├── myapp
│ ├── main.tf
│ └── terragrunt.hcl
├── mysql
│ ├── main.tf
│ └── terragrunt.hcl
├── redis
│ ├── main.tf
│ └── terragrunt.hcl
└── vpc
├── main.tf
└── terragrunt.hcl
The following runs are done from the services
folder, so we expect the account-baseline
to be skipped.
%~> terragrunt run-all apply --terragrunt-non-interactive
INFO[0000] Stack at ~/gruntwork/support/terragrunt-run-all-destroy/proj/services:
=> Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/account-baseline (excluded: false, dependencies: [])
=> Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/myapp (excluded: false, dependencies: [~/gruntwork/support/terragrunt-run-all-destroy/proj/services/mysql, ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/redis])
=> Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/mysql (excluded: false, dependencies: [~/gruntwork/support/terragrunt-run-all-destroy/proj/services/vpc])
=> Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/redis (excluded: false, dependencies: [~/gruntwork/support/terragrunt-run-all-destroy/proj/services/vpc])
=> Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/vpc (excluded: false, dependencies: [~/gruntwork/support/terragrunt-run-all-destroy/proj/account-baseline])
%~> ~/gruntwork/tools/terragrunt/terragrunt run-all apply --terragrunt-non-interactive
INFO[0000] The stack at ~/gruntwork/support/terragrunt-run-all-destroy/proj/services will be processed in the following order for command apply:
Group 1
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/vpc
Group 2
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/mysql
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/redis
Group 3
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/myapp
%~> ~/gruntwork/tools/terragrunt/terragrunt run-all destroy --terragrunt-non-interactive
INFO[0000] The stack at ~/gruntwork/support/terragrunt-run-all-destroy/proj/services will be processed in the following order for command destroy:
Group 1
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/myapp
Group 2
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/mysql
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/redis
Group 3
- Module ~/gruntwork/support/terragrunt-run-all-destroy/proj/services/vpc
Published by yorinasub17 about 3 years ago
Fixed bug where Terragrunt panicked with a nil pointer error for certain configurations.
Published by yorinasub17 about 3 years ago
Fixed a regression bug introduced in v0.35.1
where the iam_role
config was ignored when managing the s3 state bucket in auto init.
Published by yorinasub17 about 3 years ago
--terragrunt-iam-role
--terragrunt-iam-assume-role-duration
--terragrunt-iam-assume-role-session-name
iam_role
iam_assume_role_duration
iam_assume_role_session_name
NOTE: There is a regression bug introduced in this version. We recommend using v0.35.2.
The following bugs related to the assume IAM role features of terragrunt has been fixed:
--terragrunt-assume-role-session-name
, where the default session name was always used when the CLI option was not passed in due to the session name being set on the options struct with the default. Now the default is only used if it is not explicitly set by CLI flag or config.Published by yorinasub17 about 3 years ago
dependencies
[BACKWARD INCOMPATIBLE]dependency
include
include
block into consideration for the dependency run graph. Now all dependency
blocks defined across all include
configurations will be taken into consideration.As a part of this change, the behavior of how dependencies
blocks are merged together in the shallow
merge strategy has been updated to be a deep merge - now all the paths defined in dependencies
blocks across the included modules are always concatenated together rather than replaced. If you have a configuration that depended on the old behavior, you will need to update your configuration to take advantage of multiple include blocks to selectively include the parent dependencies
block.
E.g., if you had the following configurations:
parent terragrunt.hcl
dependencies {
paths = ["../vpc", "../mysql"]
}
# ... other blocks ...
child terragrunt.hcl
include "root" {
path = find_in_parent_folders()
}
dependencies {
paths = ["../new_vpc"] # intended to replace dependencies block in parent
}
# ... other blocks ...
You will want to update to the following:
parent terragrunt.hcl
# ... other blocks ...
dependencies parent terragrunt.hcl
dependencies {
paths = ["../vpc", "../mysql"]
}
child terragrunt.hcl
include "root" {
path = find_in_parent_folders()
}
dependencies {
paths = ["../new_vpc"] # intended to replace dependencies block in parent
}
# ... other blocks ...
child who wants dependencies
include "root" {
path = find_in_parent_folders()
}
include "dependencies" {
path = find_in_parent_folders("dependencies_parent_terragrunt.hcl")
}
# ... other blocks ...
Published by yorinasub17 about 3 years ago
--terragrunt-iam-assume-role-session-name
[NEW CLI OPTION]iam_assume_role_session_name
[NEW CONFIG ATTR]iam_role
dependency
iam_role
configuration functionality broke for dependencies.hclfmt
to only log files that were updated by the command by default. You can get the original output if you set --terragrunt-log-level debug
.run-all plan
were not shown to the console.iam_role
is configured.Special thanks to the following users for their contribution!
Published by yorinasub17 about 3 years ago
locals
parsing.Published by yorinasub17 about 3 years ago
include
related functions were not being correctly parsed when used in locals
blocks.Special thanks to @denis256 for their contribution!
Published by yorinasub17 about 3 years ago
iam_role
[BEHAVIOR CHANGE]get_aws_account_id
[BEHAVIOR CHANGE]get_aws_caller_identity_arn
[BEHAVIOR CHANGE]get_aws_caller_identity_user_id
[BEHAVIOR CHANGE]locals
[BEHAVIOR CHANGE]iam_role
config attribute was ignored when creating the S3 bucket during Auto-Init.iam_role
attribute early, so that it can use it to resolve each of the get_aws_*
functions. This means that the get_aws_*
functions now return answers after the IAM role has been assumed, whereas before it was always based on the . Note that this additional parsing stage means that locals
are parsed an additional time, which may cause side effects if you are using run_cmd
in locals
, and the args are dynamic so as to bust the cache.Special thanks to @denis256 for their contribution!
Published by yorinasub17 about 3 years ago
render-json
[NEW CMD]dependency
render-json
which can be used to render the json representation of the fully interpreted terragrunt.hcl
config. This can be used for debugging purposes, as well as for enforcing policies using OPA.mock_outputs
and mock_outputs_allowed_terraform_commands
or skip_outputs
.Published by yorinasub17 about 3 years ago
run-all
run-all
will now error with a more sensible error message if you are missing the Terraform command that Terragrunt should run on all modules.Special thanks to @denis256 for their contribution!
Published by yorinasub17 about 3 years ago
destroy
[BEHAVIOR CHANGE]destroy
on a single module will now check for dependency
references that point to that module. If there are any modules that reference the module being destroyed, terragrunt
will warn you with the list of modules that point to the module being destroyed and prompt for a confirmation that you are ok destroying the module. To avoid the prompt and restore previous behavior, you can pass in --terragrunt-non-interactive
.
Special thanks to @denis256 for their contribution!
Published by yorinasub17 about 3 years ago
include
inputs
) if certain conditions are met. Refer to the updated documentation for more info (specifically, section "Limitations on accessing exposed config").