Skip to content

Commit

Permalink
capture definitionReferenceId that starts with digit/number. (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
eureka-gh authored Sep 30, 2022
1 parent faa03df commit 86a4da1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/Invoke-PolicyToBicep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function New-PolicySetDefinitionsBicepInputTxtFile {
}

# If definitionReferenceId contains, then wrap in definitionReferenceId value in [] to comply with bicep formatting
if ($definitionReferenceIdForParameters.Contains("-") -or $definitionReferenceIdForParameters.Contains(" ") -or $definitionReferenceIdForParameters.Contains("\'")) {
if ($definitionReferenceIdForParameters.Contains("-") -or $definitionReferenceIdForParameters.Contains(" ") -or $definitionReferenceIdForParameters.Contains("\'") -or $definitionReferenceIdForParameters -match '^[0-9].+') {
$definitionReferenceIdForParameters = "['$definitionReferenceIdForParameters']"

# Add nested array of objects to each Policy Set/Initiative Definition in the Bicep variable, without the '.' before the definitionReferenceId to make it an accessor
Expand Down

0 comments on commit 86a4da1

Please sign in to comment.