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

docs: add yaml anchors #2898

Merged
merged 1 commit into from
Dec 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: add yaml anchors
  • Loading branch information
nitrocode authored Dec 29, 2022
commit 26eeaaca6611959b352fea4ffe05194f42bfdd9f
30 changes: 30 additions & 0 deletions runatlantis.io/docs/repo-level-atlantis-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ need to be defined.
:::

## Example Using All Keys

```yaml
version: 3
automerge: true
Expand Down Expand Up @@ -81,6 +82,35 @@ allowed_regexp_prefixes:
- staging/
```

## Example of DRYing up projects using YAML anchors

```yaml
projects:
- &template
name: template
workflow: custom
autoplan:
enabled: true
when_modified:
- "./terraform/modules/**/*.tf"
- "**/*.tf"

- <<: *template
name: ue1-prod-titan
dir: ./terraform/titan
workspace: ue1-prod

- <<: *template
name: ue1-stage-titan
dir: ./terraform/titan
workspace: ue1-stage

- <<: *template
name: ue1-dev-titan
dir: ./terraform/titan
workspace: ue1-dev
```

## Auto generate projects

This is useful if you have many projects in a repository. This assumes the `default` workspace (or no workspace).
Expand Down