We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8240065 commit 6b438c8Copy full SHA for 6b438c8
1 file changed
tests/integration/all-resource-types/modules/LogMasking.psm1
@@ -96,6 +96,15 @@ System.String
96
#>
97
function Protect-ResourceGroupName {
98
param([string]$Value)
99
+
100
+ if (-not $script:EnableMasking) { return $Value }
101
+ if ([string]::IsNullOrWhiteSpace($Value)) { return '<REDACTED:empty>' }
102
103
+ # Preserve the generated suffix for round-trip RGs: <prefix>-<date>-<time>-<rand>-<src|tgt>-rg
104
+ if ($Value -match '^([a-z0-9]+)-\d{8}-\d{6}-([a-z0-9]+)-(src|tgt)-rg$') {
105
+ return "$($Matches[1])-...-$($Matches[2])-$($Matches[3])-rg"
106
+ }
107
108
return Protect-Identifier -Value $Value -Prefix 3 -Suffix 7
109
}
110
0 commit comments