Skip to content

Terragrunt-only folders not found by autoplanΒ #6340

@BhasherBEL

Description

@BhasherBEL

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

When using auto-expanding projects with autoplan, folders containing only terragrunt files don't seems to be found.

Reproduction Steps

  1. Add a project with auto-expanding dir and autoplan
projects:
- dir: a/**/*
  autoplan:
    when_modified:
    - "*.hcl"
    - "*.tf"
    enabled: true
  1. Add a/b/c/terragrunt.hcl with a source, so that a/b/c does not contain any tf file
a/b/c
β”œβ”€β”€ .terraform.lock.hcl
β”œβ”€β”€ .terragrunt-cache
└── terragrunt.hcl
  1. Open a PR.

The folder a/b/c/ will not be found.

  1. Add a tf file
a/b/c
β”œβ”€β”€ .terraform.lock.hcl
β”œβ”€β”€ .terragrunt-cache
β”œβ”€β”€ terragrunt.hcl
└── auto.tf
  1. Re-run the pipeline

The folder a/b/c/ will be found.

Logs

Environment details

  • Atlantis version: v0.40.0
  • Deployment method: helm
  • Atlantis flags: server

Atlantis server-side config file:

repos:
- id: /.*/
  workflow: terragrunt
workflows:
  terragrunt:
    plan:
      steps:
        - env:
            name: TG_TF_PATH
            value: tofu
        - run: terragrunt plan -no-color -out $PLANFILE
    apply:
      steps:
        - run: terragrunt apply -no-color $PLANFILE

Repo atlantis.yaml file:

version: 3

automerge: false
parallel_plan: true
parallel_apply: true

projects:
- dir: a/**/*
  autoplan:
    when_modified:
    - "*.hcl"
    - "*.tf"
    enabled: true

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions