accesscontroltool
accesscontroltool copied to clipboard
Undeclared variables are not detected while applying or deploying YAML
It would be good to have an exception when we use undeclared variables in a YAML file. Example in the following code:
- DEF groups=[case1,case2,case3]
# Groups
- group_config:
- FOR group IN ${groups}:
- appl-om-de-dev-example-${group}-pd:
- name: appl-om-de-dev-example-${group}-pd
isMemberOf: parent-role
path: /home/groups/pages/example/${site}-default
# Permissions
- ace_config:
- FOR group IN ${groups}:
- appl-om-de-dev-example-${group}-pd:
- path: /content/pages/example/${site}
permission: allow
actions: read
The variable ${site} is not defined and instead of throwing an exception is replaced by an empty value.
I think we should fail fast in such a case since it could lead to a difference between indented permissions and actual permissions for a certain path in the system.
The problem with changing this behaviour now could be that it unexpectedly breaks existing setups - we might still do though but we should mention it in the release notes.
Assigned version 2.4.1 since there is no PR for it yet