Skip to content

Commit 48adf7f

Browse files
Merge pull request #278275 from mumian/0613-templateParameterObject
document PowerShell deployment templateParameterObject
2 parents 97a5466 + 8246eeb commit 48adf7f

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

articles/azure-resource-manager/bicep/deploy-powershell.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Deploy resources with PowerShell and Bicep
33
description: Use Azure Resource Manager and Azure PowerShell to deploy resources to Azure. The resources are defined in a Bicep file.
44
ms.topic: how-to
55
ms.custom: devx-track-arm-template, devx-track-bicep, devx-track-azurepowershell
6-
ms.date: 03/22/2024
6+
ms.date: 06/14/2024
77
---
88

99
# Deploy resources with Bicep and Azure PowerShell
@@ -101,6 +101,19 @@ New-AzResourceGroupDeployment -ResourceGroupName testgroup `
101101
-exampleArray $arrayParam
102102
```
103103

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+
104117
You can also get the contents of file and provide that content as an inline parameter.
105118

106119
```powershell

articles/azure-resource-manager/templates/deploy-powershell.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Deploy resources with PowerShell and template
33
description: Use Azure Resource Manager and Azure PowerShell to deploy resources to Azure. The resources are defined in a Resource Manager template.
44
ms.topic: how-to
5-
ms.date: 03/20/2024
5+
ms.date: 06/14/2024
66
ms.custom: devx-track-azurepowershell, devx-track-arm-template
77
---
88

@@ -195,6 +195,19 @@ New-AzResourceGroupDeployment -ResourceGroupName testgroup `
195195
-exampleArray $arrayParam
196196
```
197197

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+
198211
You can also get the contents of file and provide that content as an inline parameter.
199212

200213
```powershell

0 commit comments

Comments
 (0)