Skip to content

Commit

Permalink
fix vm extension script for azd install
Browse files Browse the repository at this point in the history
  • Loading branch information
dantelmomsft committed Dec 1, 2023
1 parent b0dd3ee commit c0b89ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ $env:Path += ";C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\"
##############################################################################################################
## install azure developer CLI AZD
if ($install_clis) {
$azdInstallPath = "$($env:LOCALAPPDATA)\Programs\Azure Dev CLI"
$azdInstallPath = "$($env:PROGRAMFILES)\Azure Dev CLI"

$downloads += @{
name = "AZD CLI"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
# /bin/bash

commandToExecute='powershell.exe -ExecutionPolicy Unrestricted -File post-deployment.ps1 -az_cli_commands "az version" -install_ssms'
fileUris="'https://raw.githubusercontent.com/Azure/appservice-landing-zone-accelerator/main/scenarios/shared/scripts/win-devops-vm-extensions/post-deployment.ps1'"
protectedSettings='{"fileUris": "['$fileUris']", "commandToExecute": "'$commandToExecute'" }'
echo $protectedSettings

az vm extension set -n CustomScriptExtension \
--publisher Microsoft.Compute --version 1.10 \
--vm-name vm-devops-1201 --resource-group rg-secure-appsvc-prod \
--protected-settings $protectedSettings \
--verbose

az vm extension set -n CustomScriptExtension \
--publisher Microsoft.Compute --version 1.10 \
--vm-name vm-devops-1201 --resource-group rg-secure-appsvc-prod \
--protected-settings '{"fileUris": "['https://raw.githubusercontent.com/Azure/appservice-landing-zone-accelerator/main/scenarios/shared/scripts/win-devops-vm-extensions/post-deployment.ps1']", "commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -File post-deployment.ps1 -az_cli_commands \"az version\" -install_ssms" }' \
--verbose
--vm-name vm-lza-app-beta-win-jumpbox \
--resource-group rg-spoke-lza-app-beta-dev-francecentral \
--settings '{"fileUris": ["https://raw.githubusercontent.com/Azure/appservice-landing-zone-accelerator/feature/external-outputs/scenarios/shared/scripts/win-devops-vm-extensions/post-deployment.ps1"]}' \
--protected-settings '{"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -File post-deployment.ps1 -install_cli" }' \
--verbose

0 comments on commit c0b89ec

Please sign in to comment.