Azure / PSRule.Rules.Azure

Rules to validate Azure resources and infrastructure as code (IaC) using PSRule.
https://azure.github.io/PSRule.Rules.Azure/
MIT License
389 stars 84 forks source link

Scope for inner nested templates #687

Closed BernieWhite closed 3 years ago

BernieWhite commented 3 years ago

Description of the issue

When a nested template is included with the expressionEvaluationOptions.scope = inner a template should be evaluated with defined parameters instead of parent scope.

Expected behaviour

Use a separate scope for inner scoped nested templates.

Module in use and version:

Captured output from $PSVersionTable:

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
rifaterdemsahin commented 2 years ago

The top one gets created but not this one is this related to the scope ? image