Read more

Terragrunt/terraform: fork/exec argument list too long

Stefan Langenmaier
October 11, 2022Software engineer at makandra GmbH

When terragrunt is relaying information to input variables it's happening via environment variables. Depending on the size of the content of the variable it might exceed your OS limits. This is independent of your shell.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

A possible workaround is to use a generated file to load the input instead of the env variable, e.g.

# WORKAROUND
# the variable my_huge_input cannot be loaded as part of the inputs
generate "dependencies" {
  path      = "dependencies.auto.tfvars"
  if_exists = "overwrite_terragrunt"
  contents = <<EOF
my_input     = ${jsonencode(dependency.my_huge_input)}
EOF
}

See the following issue for further discussion Show archive.org snapshot .

Posted by Stefan Langenmaier to makandra Operations (2022-10-11 12:07)