This message was deleted.
# atlantis-community
s
This message was deleted.
1
l
PS: I don’t want to give the responsibility to the developers configure autoplan
other thing that I need is to run plan only in paths that were changed, I noticed that autoplan run in all of the directories
g
We’re using this project mentioned on that page to do auto plans https://github.com/transcend-io/terragrunt-atlantis-config
l
Hi Gabriel, how are you doing? I have subdirectories and I don’t wanna manage a 400 lines atlantis.yaml
g
Hi Luiz, all good. The output from
terragrunt-atlantis-config
for me has 6.5k lines. And we don’t have to do anything other than add it as a pre-hook. That’s why I suggested.
give it a go, run it on the root of your repo
Copy code
terragrunt-atlantis-config generate --output atlantis-no-cascade-dependencies.yaml --parallel --cascade-dependencies=false
l
Understood!
Thanks for helping me!
🙌 1
@Gabriel Martinez, there is any documentation to install via Dockerfile?
g
I do something like this
Copy code
VERSION="1.16.0" #without v
cd /tmp
wget "<https://github.com/transcend-io/terragrunt-atlantis-config/releases/download/v${VERSION}/terragrunt-atlantis-config_${VERSION}_linux_amd64.tar.gz>"
tar xf "terragrunt-atlantis-config_${VERSION}_linux_amd64.tar.gz"
sudo cp "terragrunt-atlantis-config_${VERSION}_linux_amd64/terragrunt-atlantis-config_${VERSION}_linux_amd64" /usr/bin/terragrunt-atlantis-config
sudo chmod 755 /usr/bin/terragrunt-atlantis-config
terragrunt-atlantis-config version
l
It worked! Do you know if the terragrunt-atlantis-config works only for changed paths? It seems that he’s running plan for all directories
@Gabriel Martinez
g
it should only execute on projects that have paths affected by
when_modified
this is our
repos.yaml
file:
Copy code
repos:
- id: "/.*/"
  workflow: terragrunt
  apply_requirements: [approved,mergeable]
  repo_config_file: atlantis.yaml
  pre_workflow_hooks:
    - run: terragrunt-atlantis-config generate --output atlantis.yaml --parallel --cascade-dependencies=false
	description: Generating configs

workflows:
  terragrunt:
    plan:
      steps:
      - env:
          name: TERRAGRUNT_TFPATH
          command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
      - env:
          name: TF_IN_AUTOMATION
          value: 'true'
      - run: terragrunt plan -input=false -refresh -no-color -out=$PLANFILE
      - run: terragrunt show -no-color -json $PLANFILE > $SHOWFILE
    apply:
      steps:
      - env:
          name: TERRAGRUNT_TFPATH
          command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
      - env:
          name: TF_IN_AUTOMATION
          value: 'true'
      - run: terragrunt apply -input=false -refresh -no-color $PLANFILE
l
understood, one question, the atlantis.yaml stays in the container right?
g
Yes, it’s generated on the path that atlantis created for that PR
l
Sounds great man! Thanks for the help, I’m gonna continue testing, anything that I can help you, please send me a message!
🙏 1
g
Glad to help 🙂 and good luck!
1
❤️ 1