PSRule.Rules.Azure icon indicating copy to clipboard operation
PSRule.Rules.Azure copied to clipboard

Azure resource scope for policy as rules

Open BernieWhite opened this issue 2 years ago • 0 comments

To support exemptions (#1887), exclusions (#1890), and scoped policy assignment rules (#1891) need to emit a scope to resources during expansion.

To further complicate this, a single repository could include resources for more than one scope when defining infrastructure as code. So:

  • Expanded resources should default to a specific scope. This should work as a fall back but also for module tests.
  • Expansion should add awareness if resource group and subscription are known.
  • Metadata can be added to define a target scope for resources when authoring from infrastructure as code.

BernieWhite avatar Nov 23 '22 04:11 BernieWhite