File tree Expand file tree Collapse file tree
infrastructure/scripts/setup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,20 @@ trap cleanup EXIT
3232
3333# -- Generate secure username and password for webhook
3434WEBHOOK_USER=" grafana-alerts"
35- WEBHOOK_PASSWORD=$( openssl rand -base64 16 | tr -d ' \n' )
35+
36+ # Try to source IDE_PASSWORD from workshop configuration
37+ if [[ -f /etc/profile.d/workshop.sh ]]; then
38+ source /etc/profile.d/workshop.sh
39+ fi
40+
41+ # Use IDE_PASSWORD if available and not empty, otherwise generate random password
42+ if [[ -n " ${IDE_PASSWORD:- } " ]]; then
43+ WEBHOOK_PASSWORD=" $IDE_PASSWORD "
44+ log " Using IDE_PASSWORD from workshop configuration"
45+ else
46+ WEBHOOK_PASSWORD=$( openssl rand -base64 16 | tr -d ' \n' )
47+ log " Generated random webhook password (IDE_PASSWORD not available)"
48+ fi
3649
3750# -- Create the secret for webhook
3851aws secretsmanager create-secret \
You can’t perform that action at this time.
0 commit comments