Skip to content

Commit 8ca3d72

Browse files
authored
Merge pull request #187387 from mumian/0202-decorator-multi-line
markdown-formatted text support in the description decorator
2 parents 4519498 + b1bfed7 commit 8ca3d72

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed
20.6 KB
Loading

articles/azure-resource-manager/bicep/parameters.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Describes how to define parameters in a Bicep file.
44
author: mumian
55
ms.author: jgao
66
ms.topic: conceptual
7-
ms.date: 11/12/2021
7+
ms.date: 02/03/2022
88
---
99

1010
# Parameters in Bicep
@@ -154,6 +154,25 @@ To help users understand the value to provide, add a description to the paramete
154154
param virtualMachineSize string = 'Standard_DS1_v2'
155155
```
156156

157+
Markdown-formatted text can be used for the description text:
158+
159+
```bicep
160+
@description('''
161+
Storage account name restrictions:
162+
- Storage account names must be between 3 and 24 characters in length and may contain numbers and lowercase letters only.
163+
- Your storage account name must be unique within Azure. No two storage accounts can have the same name.
164+
''')
165+
@minLength(3)
166+
@maxLength(24)
167+
param storageAccountName string
168+
```
169+
170+
When you hover your cursor over **storageAccountName** in VSCode, you see the formatted text:
171+
172+
:::image type="content" source="./media/parameters/vscode-bicep-extension-description-decorator-markdown.png" alt-text="Use Markdown-formatted text in VSCode":::
173+
174+
Make sure the text is well-formatted Markdown. Otherwise the text won't be rendered correctly.
175+
157176
## Use parameter
158177

159178
To reference the value for a parameter, use the parameter name. The following example uses a parameter value for a key vault name.

0 commit comments

Comments
 (0)