Skip to content

Commit

Permalink
Merge pull request #2228 from janegilring/issue_2205_private_link
Browse files Browse the repository at this point in the history
Updated Azure Arc-enabled servers scenario for Azure Private Link to use securestring for parameters with sensitive information
  • Loading branch information
likamrat authored Nov 3, 2023
2 parents c534770 + f9b5db2 commit 216b00e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-datacenter-gensecond",
"sku": "2022-Datacenter",
"version": "latest"
},
"osDisk": {
Expand Down
18 changes: 9 additions & 9 deletions azure_arc_servers_jumpstart/privatelink/artifacts/Bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ param (
[string]$resourceGroup,
[string]$subscriptionId,
[string]$Location,
[string]$PEname,
[string]$PEname,
[string]$adminUsername,
[string]$PLscope
[string]$PLscope

)
[System.Environment]::SetEnvironmentVariable('appId', $appId,[System.EnvironmentVariableTarget]::Machine)
Expand Down Expand Up @@ -41,17 +41,17 @@ workflow ClientTools_01
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
}
if ([string]::IsNullOrWhiteSpace($using:chocolateyAppList) -eq $false){
Write-Host "Chocolatey Apps Specified"
if ([string]::IsNullOrWhiteSpace($using:chocolateyAppList) -eq $false){
Write-Host "Chocolatey Apps Specified"

$appsToInstall = $using:chocolateyAppList -split "," | foreach { "$($_.Trim())" }

foreach ($app in $appsToInstall)
{
Write-Host "Installing $app"
& choco install $app /y -Force| Write-Output
}
}
}
}
}
ClientTools_01 | Format-Table
Expand Down Expand Up @@ -89,5 +89,5 @@ Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask

# Clean up Bootstrap.log
Stop-Transcript
$logSuppress = Get-Content C:\Temp\LogonScript.log -Force | Where { $_ -notmatch "Host Application: powershell.exe" }
$logSuppress | Set-Content C:\Temp\LogonScript.log -Force
$logSuppress = Get-Content C:\Temp\LogonScript.log -Force | Where { $_ -notmatch "Host Application: powershell.exe" }
$logSuppress | Set-Content C:\Temp\LogonScript.log -Force
18 changes: 9 additions & 9 deletions azure_arc_servers_jumpstart/privatelink/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
}
},
"adminPassword": {
"type": "string",
"type": "securestring",
"metadata": {
"description": "SSH key or password for the Azure Arc-enabled virtual Machine. SSH key is recommended for Linux."
}
Expand Down Expand Up @@ -163,7 +163,7 @@
}
},
"sharedKey": {
"type": "string",
"type": "securestring",
"defaultValue": "ArcPa$$w0rd",
"metadata": {
"description": "Shared secret key for the vNET-to-vNET connection between Virtual Network Gateways."
Expand All @@ -176,7 +176,7 @@
}
},
"password": {
"type": "string",
"type": "securestring",
"metadata": {
"description": "Unique SPN password"
}
Expand All @@ -189,7 +189,7 @@
}
},
"variables": {

},
"resources": [
{
Expand Down Expand Up @@ -414,7 +414,7 @@
"type": "string"
},
"sharedKey": {
"type": "string"
"type": "securestring"
}
},
"resources": [
Expand Down Expand Up @@ -471,10 +471,10 @@
},
"PLscope": {
"value": "[reference('AzureDeployment').outputs.PLscope.value]"
},
},
"privateEndpoints_name": {
"value": "[parameters('privateEndpoints_name')]"
},
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
}
Expand All @@ -494,7 +494,7 @@
"type": "string"
},
"password": {
"type": "string"
"type": "securestring"
},
"tenantId": {
"type": "string"
Expand All @@ -510,7 +510,7 @@
}
},
"variables": {

},
"resources": [
{
Expand Down

0 comments on commit 216b00e

Please sign in to comment.