envs: can ignore zones locally as well
ignore_zones field is now a map so that
its keys can be set not only for the CI.
When a zone is declared in ci.cue in ignore_zones the zone
is ignored in the CI like before.
When a zone is declared in envs.cue in ignore_zones the zone is
ignored in the CI and locally when operators run trackbone manually.
Since the field value is a default value (*true) it is possible
to override it locally in some other file which is not committed
in the git repo.
For example if we declare in envs.cue:
ignore_zones: "ocb-test01": _
It is ignored locally and in the ci:
cue eval -t in_ci -t staging -e 'list.Contains([for n, _ in envs {n}], "ocb-test01")'
false
cue eval -t staging -e 'list.Contains([for n, _ in envs {n}], "ocb-test01")'
false
Now the operator has still the possibility to use the zone by creating a file like:
cat <<EOF > local.cue
package terraform
ignore_zones: "ocb-test01": false
EOF
This way it doesn't ignore the zone locally anymore:
cue eval -t staging -e 'list.Contains([for n, _ in envs {n}], "ocb-test01")'
false
Still it is also possible to edit manually envs.cue to unignore the
zone locally but by doing that there is a chance to commit inadvertently
the change in the repo since the file is tracked by git.