@@ -23,7 +23,7 @@ function New-AcceleratorFolderStructure {
2323 [string ] $targetFolderPath = " ~/accelerator" ,
2424 [Parameter (
2525 Mandatory = $false ,
26- HelpMessage = " [OPTIONAL] Forece recreate of the target folder if it already exists"
26+ HelpMessage = " [OPTIONAL] Force recreate of the target folder if it already exists"
2727 )]
2828 [switch ] $force
2929 )
@@ -96,13 +96,9 @@ function New-AcceleratorFolderStructure {
9696 # Clone the repo and copy the bootstrap and starter configuration files
9797 $repo = $repos [$iacType ]
9898 Write-Host " Cloning repo $ ( $repo.repoName ) "
99- git clone - n -- depth= 1 -- filter = tree: 0 " https://github.com/Azure/$ ( $repo.repoName ) " " $tempFolderPath " | Write-Verbose | Out-Null
99+ git clone -- depth= 1 " https://github.com/Azure/$ ( $repo.repoName ) " " $tempFolderPath " | Write-Verbose | Out-Null
100100 Set-Location $tempFolderPath
101101
102- Write-Host " Checking out folder $ ( $repo.folderToClone ) "
103- git sparse- checkout set -- no- cone $repo.folderToClone | Write-Verbose | Out-Null
104- git checkout | Write-Verbose | Out-Null
105-
106102 Set-Location $currentPath
107103 $exampleFolderPath = " $ ( $repo.folderToClone ) /$ ( $repo.exampleFolderPath ) "
108104 $bootstrapExampleFolderPath = " $exampleFolderPath /$ ( $repo.bootstrapExampleFolderPath ) "
@@ -124,23 +120,23 @@ function New-AcceleratorFolderStructure {
124120 # Copy the platform landing zone configuration files based on scenario number or specific file path
125121 if ($repo.hasScenarios ) {
126122 $scenarios = @ {
127- 1 = " full-multi-region/hub-and-spoke-vnet"
128- 2 = " full-multi-region/virtual-wan"
129- 3 = " full-multi-region-nva/hub-and-spoke-vnet"
130- 4 = " full-multi-region-nva/virtual-wan"
131- 5 = " management-only/management"
132- 6 = " full-single-region/hub-and-spoke-vnet"
133- 7 = " full-single-region/virtual-wan"
134- 8 = " full-single-region-nva/hub-and-spoke-vnet"
135- 9 = " full-single-region-nva/virtual-wan"
123+ 1 = " full-multi-region/hub-and-spoke-vnet.tfvars "
124+ 2 = " full-multi-region/virtual-wan.tfvars "
125+ 3 = " full-multi-region-nva/hub-and-spoke-vnet.tfvars "
126+ 4 = " full-multi-region-nva/virtual-wan.tfvars "
127+ 5 = " management-only/management.tfvars "
128+ 6 = " full-single-region/hub-and-spoke-vnet.tfvars "
129+ 7 = " full-single-region/virtual-wan.tfvars "
130+ 8 = " full-single-region-nva/hub-and-spoke-vnet.tfvars "
131+ 9 = " full-single-region-nva/virtual-wan.tfvars "
136132 }
137133
138134 Write-Host " Copying platform landing zone configuration file for scenario $scenarioNumber to $ ( $targetFolderPath ) /config/platform-landing-zone.tfvars"
139- Copy-Item - Path " $tempFolderPath /templates/platform_landing_zone/examples/ $ ( $scenarios [$scenarioNumber ]) .tfvars " - Destination " $targetFolderPath /config/platform-landing-zone.tfvars" - Force | Write-Verbose | Out-Null
135+ Copy-Item - Path " $tempFolderPath /$exampleFolderPath / $ ( $scenarios [$scenarioNumber ]) " - Destination " $targetFolderPath /config/platform-landing-zone.tfvars" - Force | Write-Verbose | Out-Null
140136
141137 } elseif ($repo.platformLandingZoneFilePath -ne " " ) {
142138 Write-Host " Copying platform landing zone configuration file to $ ( $targetFolderPath ) /config/platform-landing-zone.yaml"
143- Copy-Item - Path " $tempFolderPath /$ ( $repo.platformLandingZoneFilePath ) " - Destination " $targetFolderPath /config/platform-landing-zone.yaml" - Force | Write-Verbose | Out-Null
139+ Copy-Item - Path " $tempFolderPath /$exampleFolderPath / $ ( $repo.platformLandingZoneFilePath ) " - Destination " $targetFolderPath /config/platform-landing-zone.yaml" - Force | Write-Verbose | Out-Null
144140 }
145141
146142 Remove-Item - Path $tempFolderPath - Recurse - Force | Write-Verbose | Out-Null
0 commit comments