File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
articles/azure-resource-manager/bicep Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ title: Create parameters files for Bicep deployment
3
3
description : Create parameters file for passing in values during deployment of a Bicep file
4
4
ms.topic : conceptual
5
5
ms.custom : devx-track-bicep
6
- ms.date : 06/26 /2023
6
+ ms.date : 09/12 /2023
7
7
---
8
8
9
9
# Create parameters files for Bicep deployment
@@ -47,6 +47,35 @@ using './main.bicep'
47
47
param intFromEnvironmentVariables = int(readEnvironmentVariable('intEnvVariableName'))
48
48
```
49
49
50
+ You can define and use variables. Bicep CLI version 0.21.1 or newer is required for using variables in .bicepparam file. Here are some examples:
51
+
52
+ ``` bicep
53
+ using './main.bicep'
54
+
55
+ var storagePrefix = 'myStorage'
56
+ param primaryStorageName = '${storagePrefix}Primary'
57
+ param secondaryStorageName = '${storagePrefix}Secondary'
58
+ ```
59
+
60
+ ``` bicep
61
+ using './main.bicep'
62
+
63
+ var testSettings = {
64
+ instanceSize: 'Small'
65
+ instanceCount: 1
66
+ }
67
+
68
+ var prodSettings = {
69
+ instanceSize: 'Large'
70
+ instanceCount: 4
71
+ }
72
+
73
+ param environmentSettings = {
74
+ test: testSettings
75
+ prod: prodSettings
76
+ }
77
+ ```
78
+
50
79
# [ JSON parameters file] ( #tab/JSON )
51
80
52
81
``` json
You can’t perform that action at this time.
0 commit comments