Skip to content

Unique members in an array using YAML #2787

Answered by BernieWhite
sapritchard asked this question in Q&A
Discussion options

You must be logged in to vote

@sapritchard In this case . is a literal. It's not referring to the current field. So, your YAML expression is requiring:

  • From the array Type.datacenter.Name, the value must be any of these (.), but don't allow any item to be repeated.

In the future that could be supported by https://microsoft.github.io/PSRule/v2/expressions/functions/ but that isn't a currently supported scenario.

I've added a feature request for future consideration. #2794

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sapritchard
Comment options

Answer selected by sapritchard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants