Skip to content

Commit eb81bf6

Browse files
authored
Merge pull request #948 from Azure/947-issue-with-export-of-sync-alzpolicyfromlibrary-not-going-into-definitions-folder
Added fix for Sync-ALZFromLibrary
2 parents a34e00a + e056297 commit eb81bf6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Scripts/CloudAdoptionFramework/Sync-ALZPolicyFromLibrary.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ foreach ($file in Get-ChildItem -Path "$LibraryPath\platform\$($Type.ToLower())\
120120
# Create assignment objects
121121

122122
try {
123-
$structureFile = Get-Content .\$Type.policy_default_structure.json -ErrorAction Stop | ConvertFrom-Json
123+
$structureFile = Get-Content $DefinitionsRootFolder\$Type.policy_default_structure.json -ErrorAction Stop | ConvertFrom-Json
124124
switch ($structureFile.enforcementMode) {
125125
"Default" { $enforcementModeText = "must" }
126126
"DoNotEnforce" { $enforcementModeText = "should" }
127127
}
128128
}
129129
catch {
130-
Write-Host "No policy default structure file found. Please run Create-ALZPolicyDefaultStructure.ps1 first."
130+
Write-Host "No policy default structure file found. Please run New-ALZPolicyDefaultStructure.ps1 first and ensure the file is in the same directory as the global-settings.jsonc file"
131131
exit
132132
}
133133

StarterKit/Pipelines/AzureDevOps/alz-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ stages:
8484
- [Pipeline Run Link]($(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId))"
8585
displayName: 'Create Pull Request'
8686
env:
87-
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
87+
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)

0 commit comments

Comments
 (0)