Skip to content

Commit 9a6ecd2

Browse files
authored
Merge pull request #109551 from mumian/0330-ds-ev
add environment variable to the sample
2 parents 0795723 + 2f49b02 commit 9a6ecd2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

articles/azure-resource-manager/templates/deployment-script-template.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: azure-resource-manager
55
author: mumian
66
ms.service: azure-resource-manager
77
ms.topic: conceptual
8-
ms.date: 03/23/2020
8+
ms.date: 03/30/2020
99
ms.author: jgao
1010

1111
---
@@ -96,6 +96,12 @@ The following json is an example. The latest template schema can be found [here
9696
"forceUpdateTag": 1,
9797
"azPowerShellVersion": "3.0", // or "azCliVersion": "2.0.80"
9898
"arguments": "[concat('-name ', parameters('name'))]",
99+
"environmentVariables": [
100+
{
101+
"name": "someSecret",
102+
"secureValue": "if this is really a secret, don't put it here... in plain text..."
103+
}
104+
],
99105
"scriptContent": "
100106
param([string] $name)
101107
$output = 'Hello {0}' -f $name
@@ -121,6 +127,7 @@ Property value details:
121127
- **forceUpdateTag**: Changing this value between template deployments forces the deployment script to re-execute. Use the newGuid() or utcNow() function that needs to be set as the defaultValue of a parameter. To learn more, see [Run script more than once](#run-script-more-than-once).
122128
- **azPowerShellVersion**/**azCliVersion**: Specify the module version to be used. For a list of supported PowerShell and CLI versions, see [Prerequisites](#prerequisites).
123129
- **arguments**: Specify the parameter values. The values are separated by spaces.
130+
- **environmentVariables**: Specify the environment variables to pass over to the script. For more information, see [Develop deployment scripts](#develop-deployment-scripts).
124131
- **scriptContent**: Specify the script content. To run an external script, use `primaryScriptUri` instead. For examples, see [Use inline script](#use-inline-scripts) and [Use external script](#use-external-scripts).
125132
- **primaryScriptUri**: Specify a publicly accessible Url to the primary deployment script with supported file extensions.
126133
- **supportingScriptUris**: Specify an array of publicly accessible Urls to supporting files that are called in either `ScriptContent` or `PrimaryScriptUri`.
@@ -229,7 +236,7 @@ You can control how PowerShell responds to non-terminating errors by using the [
229236

230237
### Pass secured strings to deployment script
231238

232-
Setting environment variables in your container instances allows you to provide dynamic configuration of the application or script run by the container. Deployment script handles non-secured and secured environment variables in the same way as Azure Container Instance. For more information, see [Set environment variables in container instances](../../container-instances/container-instances-environment-variables.md#secure-values).
239+
Setting environment variables (EnvironmentVariable) in your container instances allows you to provide dynamic configuration of the application or script run by the container. Deployment script handles non-secured and secured environment variables in the same way as Azure Container Instance. For more information, see [Set environment variables in container instances](../../container-instances/container-instances-environment-variables.md#secure-values).
233240

234241
## Debug deployment scripts
235242

0 commit comments

Comments
 (0)