https://www.runatlantis.io/ logo
Title
p

Pantelis Karamolegkos

05/03/2023, 3:40 PM
Assuming I have a repo-level
atlantis.yaml
as the following. How can I leverage this feature (
regex
) to plan only for
folder1/path1
automerge: true
parallel_apply: false
parallel_plan: false
projects:
- autoplan:
    enabled: false
    when_modified:
    - '*.hcl'
    - '*.tf*'
    - '../some1/path1'
  dir: folder1/path1/
  workflow: myworkflow
- autoplan:
    enabled: false
    when_modified:
    - '*.hcl'
    - '*.tf*'
    - '../some2/path2'
  dir: folder2/path2/
  workflow: myworkflow
p

PePe Amengual

05/03/2023, 3:40 PM
mmmm I believe this only works at the project level
I can’t recall if someone made a PR to make it work with dir
p

Pantelis Karamolegkos

05/03/2023, 3:42 PM
I updated the snippet; this is like an array of projects, isn’t it?
p

PePe Amengual

05/03/2023, 3:43 PM
your snipped is not correct but I get the idea
p

Pantelis Karamolegkos

05/03/2023, 3:43 PM
It is auto-generated by this
On my
atlantis
server
p

PePe Amengual

05/03/2023, 3:44 PM
but why it has 2 autoplan projects? that is not correct
p

Pantelis Karamolegkos

05/03/2023, 3:44 PM
Has been working so far (ok perhaps I made a typo or so during copy/paste and attempt to scramble some info)
p

PePe Amengual

05/03/2023, 3:44 PM
that will make sense
anyhow you need to enabled the regex option in the server to make it work with projects
p

Pantelis Karamolegkos

05/03/2023, 3:45 PM
and pass a regex that matches…? the project
name
?
because I don’t see any such field
yes
p

Pantelis Karamolegkos

05/03/2023, 3:45 PM
ok will look a bit more into it
because the array entries do not have a
name
field
p

PePe Amengual

05/03/2023, 3:46 PM
so
atlantis plan -p *.project-prod
p

Pantelis Karamolegkos

05/03/2023, 3:46 PM
ok cool thanks
p

PePe Amengual

05/03/2023, 3:47 PM
you kinda have to have names…
p

Pantelis Karamolegkos

05/03/2023, 3:48 PM
yep that’s what I think too…will dive a bit deeper into
terragrunt-atlantis-config
to try to make it generate project names if possible
👍🏽 1