Skip to content

Commit

Permalink
Added function-app-get-system-key.yml (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudPlatformer authored Aug 25, 2022
1 parent 91b0f58 commit 9ae1b97
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
parameters:
ServiceConnection:
FunctionAppName:
OutputVariableName:

steps:
- task: AzurePowerShell@5
displayName: 'Set function app ${{ parameters.FunctionAppName }} system key durabletask_extension as secret environment variable'
inputs:
azureSubscription: ${{ parameters.ServiceConnection }}
scriptType: inlineScript
inline: |
$FunctionAppSystemKey = (Get-AzResource -Name ${{ parameters.FunctionAppName }} -ResourceType "Microsoft.Web/sites" |
Invoke-AzResourceAction -Action host/default/listkeys -Force).systemKeys.durabletask_extension
Write-Output "Setting secret variable ${{ parameters.OutputVariableName }}"
Write-Output "##vso[task.setvariable variable=${{ parameters.OutputVariableName }};isreadonly=true;issecret=true]$FunctionAppSystemKey"
pwsh: true
azurePowerShellVersion: LatestVersion

0 comments on commit 9ae1b97

Please sign in to comment.