diff --git a/docs/deploymentguide.md b/docs/deploymentguide.md index ca930a2..936c0a0 100644 --- a/docs/deploymentguide.md +++ b/docs/deploymentguide.md @@ -209,15 +209,10 @@ For network-isolated deployments, set the VM credentials before running `azd up` ```powershell azd env set VM_ADMIN_USERNAME "youradminuser" -azd env set VM_ADMIN_PASSWORD "Use-A-Strong-Password-Here!" +azd env set VM_ADMIN_PASSWORD "" ``` -If you prefer source-controlled defaults, set them in [infra/main.bicepparam](../infra/main.bicepparam) instead: - -```bicep -param vmUserName = 'youradminuser' -param vmAdminPassword = 'Use-A-Strong-Password-Here!' -``` +> ⚠️ **Security Warning:** Do **not** commit VM passwords to source control. Always use `azd env set`, a secrets manager, or pipeline secret variables for sensitive credentials. The `infra/main.bicepparam` file reads the password from the `VM_ADMIN_PASSWORD` environment variable at deployment time — no default is provided intentionally, so deployment will prompt or fail if the variable is unset. diff --git a/infra/main.bicepparam b/infra/main.bicepparam index a3342c0..82c63f5 100644 --- a/infra/main.bicepparam +++ b/infra/main.bicepparam @@ -205,7 +205,7 @@ param containerAppsList = [ ] param vmUserName = readEnvironmentVariable('VM_ADMIN_USERNAME', 'testvmuser') -param vmAdminPassword = readEnvironmentVariable('VM_ADMIN_PASSWORD', 'JumpboxAdminP@ssw0rd1234!') +param vmAdminPassword = readEnvironmentVariable('VM_ADMIN_PASSWORD', '') param vmSize = 'Standard_D2s_v4' // ======================================== diff --git a/scripts/quota_check.sh b/scripts/quota_check.sh index a481534..53b6885 100644 --- a/scripts/quota_check.sh +++ b/scripts/quota_check.sh @@ -180,6 +180,7 @@ MODEL_COUNT=${#MODEL_NAMES[@]} # ---- Results tracking ---- declare -A REGION_STATUS +declare -A RESULTS VALID_REGIONS=() # ---- Main quota check loop ---- @@ -213,7 +214,7 @@ for REGION in "${REGIONS[@]}"; do echo " (Looked for: $primary_key${alt_key:+, $alt_key})" fi ALL_PASS=false - eval "RESULT_${safe_region}_${i}=N_A" + RESULTS["${safe_region}:${i}"]="N_A" continue fi @@ -223,7 +224,7 @@ for REGION in "${REGIONS[@]}"; do LIMIT=${LIMIT%%.*} AVAILABLE=$((LIMIT - CURRENT)) - eval "RESULT_${safe_region}_${i}=${AVAILABLE}_${LIMIT}" + RESULTS["${safe_region}:${i}"]="${AVAILABLE}_${LIMIT}" if [[ "$AVAILABLE" -lt "$mcap" ]]; then echo " ❌ $display | Used: $CURRENT | Limit: $LIMIT | Available: $AVAILABLE | Need: $mcap" @@ -291,7 +292,7 @@ for REGION in "${REGIONS[@]}"; do for ((i=0; i