Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"portNumber": "##PORTNUMBER##",
"rootFolder": "##ROOTFOLDER##",
"acceptAnySshHostKey": true,
"sshHostKeyFingerprint": ""
"sshHostKeyFingerprint": "",
"sshPrivateKey": "##SSHPRIVATEKEY##"
},
"displayName": "##NAME##",
"customParameterValues": {},
Expand Down
11 changes: 9 additions & 2 deletions PsLogicAppExtractor/internal/tasks/All/All.task.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2388,7 +2388,8 @@ Task -Name "Set-Arm.Connections.ManagedApis.SftpWithSsh.Username.Advanced.AsArmO
$rootPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_Rootfolder" -Value "$($_.Name)"
$acceptPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_AcceptAnySshHostkey" -Value "$($_.Name)"
$fingerPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_SshHostKeyFingerprint" -Value "$($_.Name)"

$sshKeyPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_SshPrivateKey" -Value "$($_.Name)"

$idPreSuf = Format-Name -Type "Connection" -Value "$($_.Name)"
$displayPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_DisplayName" -Value "$($_.Name)"

Expand Down Expand Up @@ -2426,7 +2427,12 @@ Task -Name "Set-Arm.Connections.ManagedApis.SftpWithSsh.Username.Advanced.AsArmO
-Type "string" `
-Value "$fingerprint" `
-Description "The fingerprint that you expect during the initial communication with the Sftp server. ($($_.Name))"


$armObj = Add-ArmParameter -InputObject $armObj -Name "$sshKeyPreSuf" `
-Type "SecureString" `
-Value "" `
-Description "The SSH private key used to authenticate against the Sftp server. Leave empty when using password authentication. ($($_.Name))"

$armObj = Add-ArmParameter -InputObject $armObj -Name "$displayPreSuf" `
-Type "string" `
-Value $displayName `
Expand All @@ -2447,6 +2453,7 @@ Task -Name "Set-Arm.Connections.ManagedApis.SftpWithSsh.Username.Advanced.AsArmO
$apiObj.Properties.ParameterValues.rootFolder = "[parameters('$rootPreSuf')]"
$apiObj.Properties.ParameterValues.acceptAnySshHostKey = "[parameters('$acceptPreSuf')]"
$apiObj.Properties.ParameterValues.sshHostKeyFingerprint = "[parameters('$fingerPreSuf')]"
$apiObj.Properties.ParameterValues.sshPrivateKey = "[parameters('$sshKeyPreSuf')]"

# Update the api connection object type
$_.Value.id -match "/managedApis/(.*)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Task -Name "Set-Arm.Connections.ManagedApis.SftpWithSsh.Username.Advanced.AsArmO
$rootPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_Rootfolder" -Value "$($_.Name)"
$acceptPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_AcceptAnySshHostkey" -Value "$($_.Name)"
$fingerPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_SshHostKeyFingerprint" -Value "$($_.Name)"

$sshKeyPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_SshPrivateKey" -Value "$($_.Name)"

$idPreSuf = Format-Name -Type "Connection" -Value "$($_.Name)"
$displayPreSuf = Format-Name -Type "Connection" -Prefix $Prefix -Suffix "_DisplayName" -Value "$($_.Name)"

Expand Down Expand Up @@ -98,7 +99,12 @@ Task -Name "Set-Arm.Connections.ManagedApis.SftpWithSsh.Username.Advanced.AsArmO
-Type "string" `
-Value "$fingerprint" `
-Description "The fingerprint that you expect during the initial communication with the Sftp server. ($($_.Name))"


$armObj = Add-ArmParameter -InputObject $armObj -Name "$sshKeyPreSuf" `
-Type "SecureString" `
-Value "" `
-Description "The SSH private key used to authenticate against the Sftp server. Leave empty when using password authentication. ($($_.Name))"

$armObj = Add-ArmParameter -InputObject $armObj -Name "$displayPreSuf" `
-Type "string" `
-Value $displayName `
Expand All @@ -119,6 +125,7 @@ Task -Name "Set-Arm.Connections.ManagedApis.SftpWithSsh.Username.Advanced.AsArmO
$apiObj.Properties.ParameterValues.rootFolder = "[parameters('$rootPreSuf')]"
$apiObj.Properties.ParameterValues.acceptAnySshHostKey = "[parameters('$acceptPreSuf')]"
$apiObj.Properties.ParameterValues.sshHostKeyFingerprint = "[parameters('$fingerPreSuf')]"
$apiObj.Properties.ParameterValues.sshPrivateKey = "[parameters('$sshKeyPreSuf')]"

# Update the api connection object type
$_.Value.id -match "/managedApis/(.*)"
Expand Down
Loading