Summary of the new feature / enhancement
The Microsoft.Windows/FirewallRuleList resource (v0.1.0) supports per-rule _exist: false to remove named rules, but has no way to make the declared rules list authoritative — i.e., remove/disable rules that aren't declared (drift).
The canonical resource-level _purge property (semantics settled in #790) is the natural fit, but FirewallRuleList doesn't implement it. Inspecting the resource schema on dsc 3.2.1 and 3.2.2 shows no _purge (and additionalProperties: false), and the 3.3.0-preview.2 changelog adds --what-if/docs/elevation fixes but not _purge.
Use case
We're replacing legacy netsh advfirewall reset-style enforcement with DSC across ~1,500 Windows servers. We need each host's local inbound firewall to equal exactly the declared rules (Puppet-style purge of drift).
Today we work around this with a Microsoft.DSC.Transitional/PowerShellScript resource that enumerates Get-NetFirewallRule -PolicyStore PersistentStore and disables anything not in a hand-maintained allowlist. That allowlist is fragile (must be kept in sync with the declared rules by hand) and doesn't scale well. _exist: false doesn't help here because it requires knowing each undeclared rule's name in advance — drift is precisely the unknown case.
Proposed technical implementation details (optional)
Implement resource-level _purge: true on Microsoft.Windows/FirewallRuleList so the declared rules array is treated as the complete/authoritative set, consistent with the canonical _purge semantics agreed in #790.
Two questions on the intended behavior:
- Disable vs. delete — would
_purge delete undeclared rules, or could it support disabling them? We rely on disable (reversible, avoids churn on OS-regenerated built-in rules) rather than deletion.
- Policy store scope — which store would
_purge operate on? It's important that GPO-delivered rules can be excluded, so management-plane access (WinRM/RDP, delivered via GPO in a separate store) is never at risk.
Refs: #790 (canonical _purge semantics).
Summary of the new feature / enhancement
The
Microsoft.Windows/FirewallRuleListresource (v0.1.0) supports per-rule_exist: falseto remove named rules, but has no way to make the declaredruleslist authoritative — i.e., remove/disable rules that aren't declared (drift).The canonical resource-level
_purgeproperty (semantics settled in #790) is the natural fit, butFirewallRuleListdoesn't implement it. Inspecting the resource schema on dsc 3.2.1 and 3.2.2 shows no_purge(andadditionalProperties: false), and the 3.3.0-preview.2 changelog adds--what-if/docs/elevation fixes but not_purge.Use case
We're replacing legacy
netsh advfirewall reset-style enforcement with DSC across ~1,500 Windows servers. We need each host's local inbound firewall to equal exactly the declared rules (Puppet-style purge of drift).Today we work around this with a
Microsoft.DSC.Transitional/PowerShellScriptresource that enumeratesGet-NetFirewallRule -PolicyStore PersistentStoreand disables anything not in a hand-maintained allowlist. That allowlist is fragile (must be kept in sync with the declared rules by hand) and doesn't scale well._exist: falsedoesn't help here because it requires knowing each undeclared rule's name in advance — drift is precisely the unknown case.Proposed technical implementation details (optional)
Implement resource-level
_purge: trueonMicrosoft.Windows/FirewallRuleListso the declaredrulesarray is treated as the complete/authoritative set, consistent with the canonical_purgesemantics agreed in #790.Two questions on the intended behavior:
_purgedelete undeclared rules, or could it support disabling them? We rely on disable (reversible, avoids churn on OS-regenerated built-in rules) rather than deletion._purgeoperate on? It's important that GPO-delivered rules can be excluded, so management-plane access (WinRM/RDP, delivered via GPO in a separate store) is never at risk.Refs: #790 (canonical
_purgesemantics).