You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aaa460c
Browse filesBrowse the repository at this point in the historyBrowse files
Fix logic for Bicep legacy upgrades/creation and wiki (#133)
# Pull Request
This pull request includes several updates to the documentation and
PowerShell scripts to improve clarity and functionality. The most
important changes are grouped into documentation updates and PowerShell
script improvements.
### Documentation Updates:
* Updated `New-Item` commands to specify `ItemType` for both files and
directories in
`docs/wiki/[User-Guide]-Quick-Start-Phase-2-Azure-DevOps.md`
([docs/wiki/[User-Guide]-Quick-Start-Phase-2-Azure-DevOps.mdL16-R23](diffhunk://#diff-5d0a7946d9bb62a79f8c8591729ef54a59f8a93aecb6c330d8d6c1d81c5ad906L16-R23),
[docs/wiki/[User-Guide]-Quick-Start-Phase-2-Azure-DevOps.mdL92-R99](diffhunk://#diff-5d0a7946d9bb62a79f8c8591729ef54a59f8a93aecb6c330d8d6c1d81c5ad906L92-R99)).
* Updated `New-Item` commands to specify `ItemType` for both files and
directories in `docs/wiki/[User-Guide]-Quick-Start-Phase-2-GitHub.md`
([docs/wiki/[User-Guide]-Quick-Start-Phase-2-GitHub.mdL16-R21](diffhunk://#diff-e060bdd53a4020560742d085e24e0eecd91edd047d922f826b224a20df914e27L16-R21),
[docs/wiki/[User-Guide]-Quick-Start-Phase-2-GitHub.mdL84-R89](diffhunk://#diff-e060bdd53a4020560742d085e24e0eecd91edd047d922f826b224a20df914e27L84-R89)).
* Updated `New-Item` commands to specify `ItemType` for both files and
directories in `docs/wiki/[User-Guide]-Quick-Start-Phase-2-Local.md`
([docs/wiki/[User-Guide]-Quick-Start-Phase-2-Local.mdL16-R21](diffhunk://#diff-f86bb4f6ce154adfd0bf07c039be16f163e0e081779c957de4826e664e2792d0L16-R21),
[docs/wiki/[User-Guide]-Quick-Start-Phase-2-Local.mdL77-R84](diffhunk://#diff-f86bb4f6ce154adfd0bf07c039be16f163e0e081779c957de4826e664e2792d0L77-R84)).
### PowerShell Script Improvements:
* Added a `replaceFiles` switch parameter to the
`New-ALZEnvironmentBicep` function and included logic to conditionally
overwrite the configuration directory based on this parameter in
`src/ALZ/Private/Legacy-Bicep/New-ALZEnvironmentBicep.ps1`
[[1]](diffhunk://#diff-8f6a995ce9e20e98ce73d801cac6f693c81cb6c1c7a8cff780657dca6168f2ffL24-R27)
[[2]](diffhunk://#diff-8f6a995ce9e20e98ce73d801cac6f693c81cb6c1c7a8cff780657dca6168f2ffR39-R54).
* Corrected a typo in the `Get-GithubRelease` function to change
"over-writing" to "overwriting" in
`src/ALZ/Private/Shared/Get-GithubRelease.ps1`.
* Removed unnecessary whitespace and adjusted variable initialization in
the `New-ALZEnvironment` function in
`src/ALZ/Public/New-ALZEnvironment.ps1`
[[1]](diffhunk://#diff-cdabc275fb414799b1878e803c6198c09565ef53d02c3f977b4a859605fde71dL60)
[[2]](diffhunk://#diff-cdabc275fb414799b1878e803c6198c09565ef53d02c3f977b4a859605fde71dR191)
[[3]](diffhunk://#diff-cdabc275fb414799b1878e803c6198c09565ef53d02c3f977b4a859605fde71dL231-R234).
## Issue
Fixes #129
Fixes https://github.com/Azure/ALZ-Bicep/issues/813
Fixes
[AB](https://dev.azure.com/CSUSolEng/Azure%20Landing%20Zones/_sprints/backlog/Azure%20Landing%20Zones%20Bicep%20Team/Azure%20Landing%20Zones/Dilithium/202408?workitem=36409)
Description of changes:
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the projects associated license.
Write-InformationColored"Configuration directory $configDirectory already exists and the replacefiles parameter is set to $replaceFiles. Will skil overwriting the config directory."-ForegroundColor Yellow -InformationAction Continue
Write-InformationColored"The directory $targetDirectory is not a git repository. Please make sure it is a git repo after initialization."-ForegroundColor Red -InformationAction Continue
58
+
Write-InformationColored"The directory $targetDirectory is not a git repository. Please make sure it is a git repo after initialization."-ForegroundColor Red -InformationAction Continue
Write-InformationColored"The directory for $targetVersionPath has been created and populated."-ForegroundColor Green -InformationAction Continue
148
148
} else {
149
-
Write-InformationColored"The directory for $targetVersionPath already exists and has content in it, so we are not over-writing it."-ForegroundColor Green -InformationAction Continue
149
+
Write-InformationColored"The directory for $targetVersionPath already exists and has content in it, so we are not overwriting it."-ForegroundColor Green -InformationAction Continue
150
150
Write-Verbose"===> Content already exists in $releaseDirectory. Skipping"
151
151
}
152
152
153
153
# Check and replace the .env file release version if it is Bicep
Write-Verbose"We are running in legacy Bicep mode"
143
142
}
144
143
145
-
if(!$isLegacyBicep){
144
+
if(!$isLegacyBicep){
146
145
Write-Verbose"We are running in modern mode"
147
146
}
148
147
149
148
# Check and install Terraform CLI if needed
150
-
if(!$isLegacyBicep) {
151
-
if($skipInternetChecks) {
149
+
if(!$isLegacyBicep) {
150
+
if($skipInternetChecks) {
152
151
Write-InformationColored"Skipping Terraform tool check as you used the skipInternetCheck parameter. Please ensure you have the most recent version of Terraform installed"-ForegroundColor Yellow -InformationAction Continue
153
152
} else {
154
153
Write-InformationColored"Checking you have the latest version of Terraform installed..."-ForegroundColor Green -NewLineBefore -InformationAction Continue
155
-
if($iac-eq"bicep") {
154
+
if($iac-eq"bicep") {
156
155
Write-InformationColored"Although you have selected Bicep, the Accelerator leverages the Terraform tool to bootstrap your Version Control System and Azure. This is will not impact your choice of Bicep post this initial bootstrap. Please refer to our documentation for further details..."-ForegroundColor Yellow -InformationAction Continue
0 commit comments