From 0b76c28c2d35706db070609ff152d2b2c648a1a4 Mon Sep 17 00:00:00 2001 From: Jonathan Gao Date: Fri, 14 Jan 2022 12:21:18 -0500 Subject: [PATCH] add a cli sample for accessing environment variable --- deployment-script/deploymentscript-basic-cli.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/deployment-script/deploymentscript-basic-cli.json b/deployment-script/deploymentscript-basic-cli.json index c93ba93..0e9463c 100644 --- a/deployment-script/deploymentscript-basic-cli.json +++ b/deployment-script/deploymentscript-basic-cli.json @@ -29,7 +29,17 @@ "AzCliVersion": "2.15.0", "timeout": "PT30M", "arguments": "'foo' 'bar'", - "scriptContent": "result=$(az keyvault list); echo \"arg1 is: $1\"; echo \"arg2 is: $2\"; echo $result | jq -c '{Result: map({id: .id})}' > $AZ_SCRIPTS_OUTPUT_PATH", + "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": "OnSuccess", "retentionInterval": "P1D" }