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

[Feature request] Allow planning multiple dirs at once #1299

Closed
richstokes opened this issue Dec 7, 2020 · 8 comments
Closed

[Feature request] Allow planning multiple dirs at once #1299

richstokes opened this issue Dec 7, 2020 · 8 comments
Labels
feature New functionality/enhancement help wanted Good feature for contributors

Comments

@richstokes
Copy link
Contributor

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!

@mwarkentin
Copy link
Contributor

Related: #1288 (comment)

@jamengual jamengual added feature New functionality/enhancement help wanted Good feature for contributors labels Aug 26, 2022
@corradomatt
Copy link

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.

@jamengual
Copy link
Contributor

jamengual commented Nov 30, 2022 via email

@ShradhaKhard
Copy link

Having this feature will be super helpful!

@nitrocode
Copy link
Member

@ShradhaKhard you can do this now, set --enable-regexp-cmd on atlantis, and use a regular expression to filter.

atlantis plan -p .*(dev|prod).*

@nitrocode
Copy link
Member

This may be a duplicate of #686 and #2757. Closing for now to consolidate discussion in 686

@laertis
Copy link

laertis commented Apr 16, 2024

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

@RobertAlbus
Copy link

RobertAlbus commented Jun 6, 2024

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]

I often have to make changes in a legacy TF repo at work. There are hundreds of state files managed in this repo. Often I will have to create 8+ different atlantis plan -d specific/directory/path comments in a given PR. In a perfect world this repo would be refactored into something easier to use, but pragmatics don't always allow such things.

@nitrocode Can we consider re-opening this feature request? Being able to run a plan on multiple directories at once would make such a huge impact for legacy TF repos like the one I refer to above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement help wanted Good feature for contributors
Projects
None yet
Development

No branches or pull requests

8 participants