I use terragrunt to keep my code DRY, I have two repo structures one for modules and the other where my terragrunt files reside and inside the terragrunt.hcl I refer the source module via git .
Just checking out if anyone has successfully implemented Atlantis for terragrunt, not much documentation is available for the same.
If you have implemented pls share the repo for reference as most atlantis.yaml are meant for terraform not terragrunt
I've implemented it. The Atlantis docs have a section on Terragrunt now.
I will repost the Atlantis docs below in case the link breaks, but I would encourage you to look at the docs as that is the most up-to-date reference.
One thing to note is that the docs use $COMMENT_ARGS, but I don't recommend that as it may give the opportunity for command injection. I removed it.
You can either use your repo's atlantis.yaml file or the Atlantis server's repos.yaml file.
Given a directory structure:
If using the server repos.yaml file, you would use the following config:
If using the repo's atlantis.yaml file you would use the following config:
NOTE: If using the repo's atlantis.yaml file, you will need to specify each directory that is a Terragrunt project.
⚠️ WARNING
Atlantis will need to have the terragrunt binary in its PATH. If you're using Docker you can build your own image
If you don't want to create/manage the repo's atlantis.yaml file yourself, you can use the tool terragrunt-atlantis-config to generate it.
The terragrunt-atlantis-config tool is a community project and not maintained by the Atlantis team.