Skip to content

How can you find a different TargetObject via id? #1983

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

You must be logged in to vote

@C0smin Yeah that is a tricky one. PSRule for Azure today doesn't provide a good solution to co-ordinate or follow relationships between resources. The exception is parent and sub-resources.

So storageDiagnostics is nested in storageAccount1 as discussed in #1969. However there isn't an equivalent of Get-PSRuleItem available today.

One way you could approach it would be to create a rule based on the Microsoft.Resources/deployments resource, however the downside here is that you will need to process an un-expanded ARM template structure.


If the community would find such a feature helpful please upvote this idea over here #1984.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by C0smin
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