From baabf49d93e93bdb989b07a7ffc8d10aca76a23b Mon Sep 17 00:00:00 2001 From: Luke Kysow Date: Thu, 2 Aug 2018 21:19:35 -0700 Subject: [PATCH] Update docs to specifically call out Terragrunt. --- .../guide/atlantis-yaml-use-cases.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/runatlantis.io/guide/atlantis-yaml-use-cases.md b/runatlantis.io/guide/atlantis-yaml-use-cases.md index ccf29b8c2..48a0ac5ae 100644 --- a/runatlantis.io/guide/atlantis-yaml-use-cases.md +++ b/runatlantis.io/guide/atlantis-yaml-use-cases.md @@ -159,6 +159,42 @@ workflows: extra_args: ["-lock=false"] ``` +## Terragrunt +Atlantis supports running custom commands in place of the default Atlantis +commands. We can use this functionality to enable +[Terragrunt](https://github.com/gruntwork-io/terragrunt). + +Given a directory structure: +``` +. +├── atlantis.yaml +├── live +│   ├── prod +│   │   └── terraform.tfvars +│   └── staging +│   └── terraform.tfvars +└── modules +   └── ... +``` + +You could use an `atlantis.yaml` with these contents: +```yaml +version: 2 +projects: +- dir: live/staging + workflow: terragrunt +- dir: live/prod + workflow: terragrunt +workflows: + terragrunt: + plan: + steps: + - run: terragrunt plan -no-color -out $PLANFILE + apply: + steps: + - run: terragrunt apply -no-color $PLANFILE +``` + ## Running custom commands Atlantis supports running custom commands. In this example, we want to run a script after every `apply`: