Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 17 additions & 0 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,23 @@ pipelines:
targets: *generic_targets
```

If you want to define anchors before you use them as an alias, you can use any top-level key that starts with `x-` or `x_`. For example, if you want to define all account ids in one place, you could write:

```yaml
x_account_ids:
- &codecommit_account: "111111111111"
- &some_target_account: "222222222222"
pipelines:
- name: sample-vpc
default_providers:
source:
provider: codecommit
properties:
account_id: *codecommit_account
targets:
- *some_target_account
```

For more advanced yaml usage, see [here](https://learnxinyminutes.com/docs/yaml/)

### One to many relationships
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@
Optional("completion_trigger"): COMPLETION_TRIGGERS_SCHEMA
}
TOP_LEVEL_SCHEMA = {
"pipelines": [PIPELINE_SCHEMA]
"pipelines": [PIPELINE_SCHEMA],
# Allow any toplevel key starting with "x-" or "x_".
# ADF will ignore these, but users can use them to define anchors in one place.
Optional(Regex('^[x][-_].*')): object
}

class SchemaValidation:
Expand Down