Atlantis: Support prerequisite apply of projects for apply_requierements

Created on 13 Dec 2018  路  6Comments  路  Source: runatlantis/atlantis

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:

version: 2
projects:
- name: staging
  dir: .
  workspace: staging
  terraform_version: v0.11.10
  apply_requirements: [approved]
- name: production
  dir: .
  workspace: production
  terraform_version: v0.11.10
  apply_requirements: [approved, staging]

In this example I can't apply production until staging is applied.
It could be very useful in some workflow.

feature

Most helpful comment

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 - https://github.com/runatlantis/atlantis/blob/708fa0c19f29237c7d6e8e37b2174578126eeaff/server/events/project_command_runner.go#L213.

Is it fair to assume that any other value in apply_requirements that is not approved or mergeable is a project that you require to of been applied?

Another thing to consider would be apply-all option. If a project is added to apply_requirements, this would break apply-all.

All 6 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,
Any news on this ? This feature would be great with workspaces !

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 - https://github.com/runatlantis/atlantis/blob/708fa0c19f29237c7d6e8e37b2174578126eeaff/server/events/project_command_runner.go#L213.

Is it fair to assume that any other value in apply_requirements that is not approved or mergeable is a project that you require to of been applied?

Another thing to consider would be apply-all option. If a project is added to apply_requirements, this would break apply-all.

It's really good to have apply_requirements with other projects.
eg. If we have mentioned project name in apply_requirements, then that project should get apply first. So we can use outputs from that project. Now it fails with the new setup and works with already applied projects. But its really nice to have for new projects as well.

Hi, just want to follow up with this feature request. Is it being activity worked on?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natalysheinin picture natalysheinin  路  3Comments

cheethoe picture cheethoe  路  4Comments

richstokes picture richstokes  路  3Comments

tlkamp picture tlkamp  路  5Comments

gaahrdner picture gaahrdner  路  3Comments