Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atlantis with terragrunt ignores files from subdirectories #2603

Open
ThiagoMartinsdeMelo opened this issue Oct 19, 2022 · 0 comments
Open
Labels
bug Something isn't working help wanted Good feature for contributors

Comments

@ThiagoMartinsdeMelo
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

Hi,

We have a project that we are using the terragrunt workflow and the '--autoplan-file-list' flag does not consider *.json, *.yaml, *.yml files that are in subdirectories of the terragrunt structure.

Our file structure follows this format:

.
└── live
    ├── prod
    │   ├── main.tf
    │   ├── terragrunt.hcl
    │   └── policies
    │       └──iam.json
    └── staging
        ├── main.tf
        ├── terragrunt.hcl
        └── policies
            └──iam.json

If we change a value in the iam.json file, atlantis does not detect the file change and does not perform the 'auto plan'.

We have already added the values that detect this modification to the '--autoplan-file-list' flag. Example:
**/config\\-*.json, so the plan goes to the policies directory and not the prod directory.

Reproduction Steps

Logs

exit status 1: running "terragrunt plan -no-color -out=$PLANFILE" in "/atlantis-data/repos/iac-project/446/default/atlantis/policies": 
time=2022-10-19T19:47:45Z level=error msg=Error reading file at path /atlantis-data/repos/iac-project/446/default/atlantis/policies/terragrunt.hcl: open /atlantis-data/repos/iac-project/446/default/atlantis/policies/terragrunt.hcl: no such file or directory
time=2022-10-19T19:47:45Z level=error msg=Unable to determine underlying exit code, so Terragrunt will exit with error code 1

Environment details

Atlantis version: v0.19.2

Atlantis server-side config file:

---
  repos:
  - id: /.*/
    apply_requirements: [approved]
    allow_custom_workflows: true
    workflow: terragrunt
    delete_source_branch_on_merge: true
    allowed_overrides: [apply_requirements, workflow, delete_source_branch_on_merge]
  workflows:
    terragrunt:
      plan:
        steps:
          - run: terragrunt plan -no-color -out=$PLANFILE
      apply:
        steps:
          - run: terragrunt apply -no-color $PLANFILE

Repo atlantis.yaml file:

none
@ThiagoMartinsdeMelo ThiagoMartinsdeMelo added the bug Something isn't working label Oct 19, 2022
@jamengual jamengual added the help wanted Good feature for contributors label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Good feature for contributors
Projects
None yet
Development

No branches or pull requests

2 participants