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 58015ba
Browse filesBrowse the repository at this point in the historyBrowse files
Updates to support telemetry and better prompts (#115)
# Pull Request
## Issue
#114
## Description
This PR makes no significant functional changes other than improving the
prompts users see for IaC, bootstrao and starter.
The primary update is to pull the bootstrap and starter from named
artefacts. By doing this we can get some usage telemetry from the GitHub
API.
Note that changes have been made to the starter and bootstrap repos for
Terraform to accommodate this, but all those changes are backwards
compatible and already released. They are ready to go with these changes
now.
## Testing
- E2E tests have be run for this branch here:
https://github.com/Azure/accelerator-bootstrap-modules/actions/runs/9414281487
- Manual testing of Terraform and Bicep happy paths has been completed
for prompt testing.
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the projects associated license.
Write-InformationColored"Please select the starter module you would like to use, you can enter one of the following keys:"-ForegroundColor Yellow -InformationAction Continue
Write-InformationColored"The starter '$result' that you have selected does not exist. Please try again with a valid starter..."-ForegroundColor Red -InformationAction Continue
Write-InformationColored"The $typeDescription '$result' that you have selected does not exist. Please try again with a valid $typeDescription..."-ForegroundColor Red -InformationAction Continue
64
+
throw"The $typeDescription '$result' that you have selected does not exist. Please try again with a valid $typeDescription..."
54
65
}
66
+
return$result
55
67
}
68
+
}
56
69
57
-
if($type-eq"iac") {
58
-
Write-InformationColored"Please select the IAC you would like to use, you can enter one of 'bicep or 'terraform': "-ForegroundColor Yellow -NoNewline -InformationAction Continue
59
-
$result=Read-Host
60
-
61
-
$validIac=@("bicep","terraform")
62
-
if($result-notin$validIac) {
63
-
Write-InformationColored"The IAC '$result' that you have selected does not exist. Please try again with a valid IAC..."-ForegroundColor Red -InformationAction Continue
70
+
# Add the options to the choices array
71
+
$choices=@()
72
+
$usedLetters=@()
73
+
foreach($optionin$options) {
74
+
$letterIndex=0
64
75
65
-
} else {
66
-
$gotValidInput=$true
67
-
}
76
+
Write-Verbose"Checking for used letters in '$($option.name)'. Used letters: $usedLetters"
Write-InformationColored"Please select the bootstrap module you would like to use, you can enter one of the following keys:"-ForegroundColor Yellow -InformationAction Continue
Write-InformationColored"The starter '$result' that you have selected does not exist. Please try again with a valid starter..."-ForegroundColor Red -InformationAction Continue
91
-
} else {
92
-
$gotValidInput=$true
93
-
}
94
-
}
95
-
}
91
+
Write-InformationColored"You selected '$result'. Continuing with deployment..."-ForegroundColor Green -InformationAction Continue
Write-InformationColored"Failed to download the release $releaseTag from the GitHub repository $repoOrgPlusRepo"-ForegroundColor Red -InformationAction Continue
@@ -120,11 +133,15 @@ function Get-GithubRelease {
0 commit comments