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

fix: Merge depends-on.md into repo-level-atlantis-yaml.md #3823

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 0 additions & 21 deletions runatlantis.io/docs/depends-on.md

This file was deleted.

41 changes: 41 additions & 0 deletions runatlantis.io/docs/repo-level-atlantis-yaml.md
Expand Up @@ -66,6 +66,8 @@ projects:
apply_requirements: [mergeable, approved, undiverged]
import_requirements: [mergeable, approved, undiverged]
execution_order_group: 1
depends_on:
- project-1
workflow: myworkflow
workflows:
myworkflow:
Expand Down Expand Up @@ -280,6 +282,45 @@ in each group one by one.
If any plan/apply fails and `abort_on_execution_order_fail` is set to true on a repo level, all the
following groups will be aborted. For this example, if project2 fails then project1 will not run.

To ensure targeted applies respect the `exection_order_group`, you may define the `depends_on` attribute.

For a configuration as follows:
```yaml
version: 3
projects:
- name: development
dir: .
autoplan:
when_modified: ["*.tf", "vars/development.tfvars"]
execution_order_group: 1
workspace: development
workflow: infra
- name: staging
dir: .
autoplan:
when_modified: ["*.tf", "vars/staging.tfvars"]
depends_on: ["development"]
execution_order_group: 2
workspace: staging
workflow: infra
- name: production
dir: .
autoplan:
when_modified: ["*.tf", "vars/production.tfvars"]
depends_on: ["staging"]
execution_order_group: 3
workspace: production
workflow: infra
```
the `depends_on` feature will make sure that `production` is not applied before `staging` for example.

::: tip
What Happens if one or more project's dependencies are not applied?

If there's one or more projects in the dependency list which is not in applied status, users will see an error
if they try to run `atlantis apply`.
:::

### Custom Backend Config
See [Custom Workflow Use Cases: Custom Backend Config](custom-workflows.html#custom-backend-config)

Expand Down