Skip to content

Commit

Permalink
docs: fix if_all_else example
Browse files Browse the repository at this point in the history
  • Loading branch information
jshlbrd committed Nov 7, 2023
1 parent e4838cf commit d369e37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/config/condition/meta/if_all_else/config.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// validate or summarize values in an array.
local sub = import '../../../../../build/config/substation.libsonnet';

local any_gt_zero = sub.cnd.all(
local domain_match = sub.cnd.all(
// After running the example, try changing this to "any" or "none" and see
// what happens.
sub.cnd.meta.for_each(settings={ type: 'none', inspector: sub.cnd.str.ends_with(settings={ string: '@brex.com' }) }),
sub.cnd.meta.for_each(settings={ type: 'all', inspector: sub.cnd.str.ends_with(settings={ string: '@brex.com' }) }),
);

{
Expand All @@ -19,7 +19,7 @@ local any_gt_zero = sub.cnd.all(
sub.tf.meta.switch(
settings={ switch: [
{
condition: any_gt_zero,
condition: domain_match,
transform: sub.tf.obj.insert(settings={ object: { set_key: 'meta result' }, value: true }),
},
{
Expand Down

0 comments on commit d369e37

Please sign in to comment.