#terragrunt (2023-09)


Terragrunt discussions

Archive: https://archive.sweetops.com/terragrunt/


Zing avatar

is terragrunt dead? community seems quite inactive these days

loren avatar

Terragrunt is fine, just doesn’t have a lot of active users in cloudposse slack community, or maybe just has users that don’t have questions lol

Zing avatar

do you know of any other slack communities with a more active terragrunt community?

loren avatar

hmm, while that one claims to be a “community” slack, it restricts the logon domain…

loren avatar

I reached out to gruntwork and they offered their github discussions as the most publicly available discussion forum… https://github.com/orgs/gruntwork-io/discussions

Zing avatar


Sean avatar

definitely active and heavily used. But fairly stable so doesn’t need tons of updates. They were never intending to replace terraform, only extend it with features not taken into terraform.

I assume some of those features will be brought into OpenTF which could in time reduce need for terragrunt… like better handling of backends.

Zing avatar

how are you all handling remote state lookups for outputs to module inputs?

Dominique Dumont avatar
Dominique Dumont

I pass information from one stack output to another stack input using dependency blocks.

Zing avatar

so you’re creating a .hcl file for remote state calls?

Zing avatar

(resources created via terraform/external sources)

Dominique Dumont avatar
Dominique Dumont

Yes, all my stacks are using terragrunt.hcl. I avoid terraform remote states because this makes refactoring much harder.

Zing avatar

you don’t have any resources that were created OUTSIDE of terragrunt?

Kyle Johnson avatar
Kyle Johnson

we put values like this into yaml files (1 per environment: prod / staging)

then in our module-level terragrunt.hcl we do something like:

locals {
  common = yamldecode(file(find_in_parent_folders("common_vars.yaml")))

then in the inputs = {} section we can reference values:

  imports_smtp_user               = local.common.imports.smtp_user
  imports_smtp_port               = local.common.imports.smtp_port
  imports_smtp_host               = local.common.imports.smtp_host

also works with sops:

db_connection = yamldecode(sops_decrypt_file(find_in_parent_folders("db.sops.yaml")))
Zing avatar

Are those imports hardcoded values though?