-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathdeploymentscript-basic-cli.json
54 lines (54 loc) · 1.5 KB
/
deploymentscript-basic-cli.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"identity": {
"type": "string"
},
"utcValue": {
"type": "string",
"defaultValue": "[utcNow()]"
}
},
"resources": [
{
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "2020-10-01",
"name": "runBashWithOutputs",
"location": "[resourceGroup().location]",
"kind": "AzureCLI",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"[parameters('identity')]": {
}
}
},
"properties": {
"forceUpdateTag": "[parameters('utcValue')]",
"AzCliVersion": "2.40.0",
"timeout": "PT30M",
"arguments": "'foo' 'bar'",
"environmentVariables": [
{
"name": "UserName",
"value": "jdole"
},
{
"name": "Password",
"secureValue": "jDolePassword"
}
],
"scriptContent": "result=$(az keyvault list); echo \"arg1 is: $1\"; echo \"arg2 is: $2\"; echo \"Username is: $UserName\"; echo \"password is: $Password\"; echo $result | jq -c '{Result: map({id: .id})}' > $AZ_SCRIPTS_OUTPUT_PATH",
"cleanupPreference": "OnExpiration",
"retentionInterval": "P1D"
}
}
],
"outputs": {
"result": {
"value": "[reference('runBashWithOutputs').outputs]",
"type": "object"
}
}
}