-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support prerequisite apply of projects for apply_requirements
#391
Comments
Hi Jonathan, your request makes sense. Basically you want to do promotions between environments and require one environment to be applied prior to the other. |
It is exacly what I would like 👍 |
Hello guys, |
Hey, have been looking into how this could be implemented and from a quick browse of the code, seems like you could lookup whether the required projects have been applied here -
Is it fair to assume that any other value in Another thing to consider would be |
It's really good to have apply_requirements with other projects. |
Hi, just want to follow up with this feature request. Is it being activity worked on? |
apply_requirements
In the event that somebody does pick up this feature request, I would suggest that there are also interesting use cases for prerequisites of Our immediate use case is to factor out some common workflow taking place before the actual Another, even more interesting, use case would be layered or cascaded projects, such as deploying AWS OpenSearch instances (and waiting for them to become live) before using the ElasticSearch provider to configure users and roles and indexes in the just created OpenSearch instances. This use case is # 9 on the list of most popular Terraform issues – Terraform itself cannot handle this in a single plan/apply cycle and requires deployment to be completed at each layer before proceeding to the next one. If Atlantis were able to represent these dependencies, I suspect it would be a very compelling feature. |
There is a key for https://www.runatlantis.io/docs/command-requirements.html#mergeable
See https://www.runatlantis.io/docs/repo-level-atlantis-yaml.html#order-of-planning-applying |
The For the layered Terraform use case, it also seems like this feature falls a bit short. The documentation is a bit ambiguous when it says "Atlantis runs planning/applying for project2 first, then for project1" – does that means it runs both Since In that circumstance, you would end up having to do multiple iterations of |
I believe terragrunt can apply directories in a specific order too and Atlantis supports terragrunt out of the box. The documentation all come from community contributions. If you notice something in there that falls short, please feel free to experiment and propose changes to clarify anything ambiguous. |
@dupuy26 I mentioned the same/similar issue here. It seems it's currently only achievable with Atlantis+Terragrunt+Terraform, but not Atlantis+Terraform, which is an issue for my current project, where |
I have followed a different approach to achieve the above, e.g promotions between environments. My approach does not use the apply_requirement key, instead, I have introduced a separate key version: 3
projects:
- dir: .
name: project-1
- dir: .
name: project-2
depends_on: [project-1] Found it less complicated than trying to mess up with the existing apply_requirements, as well as it is clear what the intention of it (Create dependencies between projects), which's a strategy that's used in many tools, e.g terraform. This is the PR for the changes: #3292 |
Hi,
The title might not be very clear and can be reworked.
What I would like is the possibility to have a project apply in the
apply_requirements: []
You can't run an apply if the project define in
apply_requierements
is not apply before.Example:
In this example I can't apply production until staging is applied.
It could be very useful in some workflow.
The text was updated successfully, but these errors were encountered: