File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
articles/azure-resource-manager Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ title: Deploy resources with PowerShell and Bicep
3
3
description : Use Azure Resource Manager and Azure PowerShell to deploy resources to Azure. The resources are defined in a Bicep file.
4
4
ms.topic : how-to
5
5
ms.custom : devx-track-arm-template, devx-track-bicep, devx-track-azurepowershell
6
- ms.date : 03/22 /2024
6
+ ms.date : 06/14 /2024
7
7
---
8
8
9
9
# Deploy resources with Bicep and Azure PowerShell
@@ -101,6 +101,19 @@ New-AzResourceGroupDeployment -ResourceGroupName testgroup `
101
101
-exampleArray $arrayParam
102
102
```
103
103
104
+ You can use the ` TemplateParameterObject ` parameter to pass through a hashtable that contains the parameters for the template.
105
+
106
+ ``` powershell
107
+ $params = @{
108
+ exampleString = "inline string"
109
+ exampleArray = "value1", "value2"
110
+ }
111
+
112
+ New-AzResourceGroupDeployment -ResourceGroupName testgroup `
113
+ -TemplateFile <path-to-bicep> `
114
+ -TemplateParameterObject $params
115
+ ```
116
+
104
117
You can also get the contents of file and provide that content as an inline parameter.
105
118
106
119
``` powershell
Original file line number Diff line number Diff line change 2
2
title : Deploy resources with PowerShell and template
3
3
description : Use Azure Resource Manager and Azure PowerShell to deploy resources to Azure. The resources are defined in a Resource Manager template.
4
4
ms.topic : how-to
5
- ms.date : 03/20 /2024
5
+ ms.date : 06/14 /2024
6
6
ms.custom : devx-track-azurepowershell, devx-track-arm-template
7
7
---
8
8
@@ -195,6 +195,19 @@ New-AzResourceGroupDeployment -ResourceGroupName testgroup `
195
195
-exampleArray $arrayParam
196
196
```
197
197
198
+ You can use the ` TemplateParameterObject ` parameter to pass through a hashtable that contains the parameters for the template.
199
+
200
+ ``` powershell
201
+ $params = @{
202
+ exampleString = "inline string"
203
+ exampleArray = "value1", "value2"
204
+ }
205
+
206
+ New-AzResourceGroupDeployment -ResourceGroupName testgroup `
207
+ -TemplateFile <path-to-bicep> `
208
+ -TemplateParameterObject $params
209
+ ```
210
+
198
211
You can also get the contents of file and provide that content as an inline parameter.
199
212
200
213
``` powershell
You can’t perform that action at this time.
0 commit comments