atlantis
atlantis copied to clipboard
[Feature request] Allow planning multiple dirs at once
It would be really helpful if you could do e.g.
atlantis plan -d terraform/prod -d terraform/staging
to plan multiple directories at the same time.
This assumes the scenario in which each dir has its own backend/state, so theres no reason why both couldn't be planned in parallel.
Thanks!
Related: https://github.com/runatlantis/atlantis/issues/1288#issuecomment-739297461
FWIW I've been able to make this work with multiple comments. Each comment calls out a different directory with it's own state/backend. You just have to make sure that you don't create the comments too soon after the previous comment, I wait about 3-5 seconds between comments. This will result in multiple plans being generated at the same time. It's a little tedious and causes comment spam for anyone following the PR but it works.
you can do this at the project level. if you have a project per dir ( autogenerated atlantis.yaml) you can plan using regex.
https://www.runatlantis.io/docs/server-configuration.html#enable-regexp-cmd
On Wed, Nov 30, 2022 at 9:49 AM corradomatt @.***> wrote:
FWIW I've been able to make this work with multiple comments. Each comment calls out a different directory with it's own state/backend. You just have to make sure that you don't create the comments too soon after the previous comment, I wait about 3-5 seconds between comments. This will result in multiple plans being generated at the same time. It's a little tedious and causes comment spam for anyone following the PR but it works.
— Reply to this email directly, view it on GitHub https://github.com/runatlantis/atlantis/issues/1299#issuecomment-1332528205, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ3ERAKDGW64TGJPEKCHBLWK6HQ5ANCNFSM4URAIGIQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Having this feature will be super helpful!
@ShradhaKhard you can do this now, set --enable-regexp-cmd
on atlantis, and use a regular expression to filter.
atlantis plan -p .*(dev|prod).*
This may be a duplicate of https://github.com/runatlantis/atlantis/issues/686 and https://github.com/runatlantis/atlantis/issues/2757. Closing for now to consolidate discussion in 686
Bumping on this a couple of years later as I don't think it's a duplicate of #686 or #2757
The issue refers to the ability to write a a comment of the form atlantis plan -d stateDir1 -d stateDir2
in github/gitlab/etc that the webhook url recognizes and parses properly into planning multiple directories
I believe this serves a different purpose than the atlantis.yml
configuration and it adds some value
I agree with @laertis, the directories may not follow a wildcard-compatible naming scheme. either multiple -d
arguments, or a version of the argument that can accept a list, e.g. -d [dir_1, dir_2, some_other_dir]