You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/deployment-script-template.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ The following template has one resource defined with the `Microsoft.Resources/de
132
132
133
133
The script takes one parameter, and output the parameter value. **DeploymentScriptOutputs** is used for storing outputs. In the outputs section, the **value** line shows how to access the stored values. `Write-Output` is used for debugging purpose. To learn how to access the output file, see [Debug deployment scripts](#debug-deployment-scripts). For the property descriptions, see [Sample template](#sample-template).
134
134
135
-
To run the script, select **Try it** to open the Cloud shell, and then paste the following code into the shell pane.
135
+
To run the script, select **Try it** to open the cloud shell, and then paste the following code into the shell pane.
136
136
137
137
```azurepowershell-interactive
138
138
$resourceGroupName = Read-Host -Prompt "Enter the name of the resource group to be created"
@@ -182,7 +182,7 @@ Supporting script files can be called from both inline scripts and primary scrip
182
182
183
183
The supporting files are copied to azscripts/azscriptinput at the runtime. Use relative path to reference the supporting files from inline scripts and primary script files.
184
184
185
-
## Work with outputs from PowerShell deployment scripts
185
+
## Work with outputs from PowerShell script
186
186
187
187
The following template shows how to pass values between two deploymentScripts resources:
188
188
@@ -194,9 +194,9 @@ In the first resource, you define a variable called **$DeploymentScriptOutputs**
194
194
reference('<ResourceName>').output.text
195
195
```
196
196
197
-
## Work with outputs from CLI deployment scripts
197
+
## Work with outputs from CLI script
198
198
199
-
Different than the Powershell version, CLI/bash support does not expose a common variable to store script outputs, instead, there is an environment variable called **AZ_SCRIPTS_OUTPUT_PATH** that stores the location where the script outputs file resides. If a deployment script is ran from a Resource Manager template, this environment variable is set automatically for you by the Bash shell.
199
+
Different from the PowerShell deployment script, CLI/bash support does not expose a common variable to store script outputs, instead, there is an environment variable called **AZ_SCRIPTS_OUTPUT_PATH** that stores the location where the script outputs file resides. If a deployment script is ran from a Resource Manager template, this environment variable is set automatically for you by the Bash shell.
200
200
201
201
Deployment script outputs must be saved in the AZ_SCRIPTS_OUTPUT_PATH location, and the outputs must be a valid JSON string object. The contents of the file must be saved as a key-value pair. For example, an array of strings is stored as { “MyResult”: [ “foo”, “bar”] }. Storing just the array results, for example [ “foo”, “bar” ], is invalid.
0 commit comments