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/bicep/visual-studio-code.md
+23-3Lines changed: 23 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create Bicep files by using Visual Studio Code
3
3
description: Learn how to use Visual Studio Code to create Bicep files.
4
4
ms.topic: how-to
5
5
ms.custom: devx-track-bicep
6
-
ms.date: 11/21/2024
6
+
ms.date: 12/10/2024
7
7
---
8
8
9
9
# Create Bicep files by using Visual Studio Code
@@ -205,17 +205,37 @@ The yellow light bulb in VS Code represents a quick fix suggestion. It appears w
205
205
206
206
:::image type="content" source="./media/visual-studio-code/visual-studio-code-bicep-context-quick-fix-suggestions.png" alt-text="Screenshot of Visual Studio Code quick fix suggestions.":::
207
207
208
-
For the extract commands, see [Extract paramters, variables, and types](#extract-parameters-variables-and-types). In **More Actions**, it suggests adding [decorators](./variables.md#use-decorators).
208
+
For the extract commands, see [Extract parameters, variables, and types](#extract-parameters-variables-and-types). In **More Actions**, it suggests adding [decorators](./variables.md#use-decorators).
209
209
210
210
## Extract parameters, variables, and types
211
211
212
212
Extracting [variables](./variables.md), [parameters](./parameters.md), and [user-defined data types](./user-defined-data-types.md) involves isolating and defining these components from existing code to improve code structure, maintainability, and clarity.
213
213
214
-
The following screenshot shows a definition of a storage account resource. You can extract a parameter or a variable, or a user-defined data type based of a property, such as `kind`. Select the `kind` line from the code, and then select the yellow light bulb icon, the context windows shows the available extract options.
214
+
The following screenshot shows a definition of a storage account resource. You can extract a parameter or a variable, or a user-defined data type based of a property, such as `kind`.
215
+
216
+
Select the `kind` line from the code, and then select the yellow light bulb icon. The context windows shows the available extract options.
215
217
216
218
:::image type="content" source="./media/visual-studio-code/visual-studio-code-azure-variable-parameter-type-extraction.png" alt-text="Screenshot of variable, parameter, type extraction.":::
217
219
220
+
-**Extract variable**: creates a new variable, and give you an option to update the variable name:
221
+
222
+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-azure-variable-parameter-type-extract-variable.png" alt-text="Screenshot of extracting variable.":::
223
+
224
+
-**Extract parameter of type \<data-type>**: create a new parameter, and give you an option to update the parameter name:
225
+
226
+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-azure-variable-parameter-type-extract-parameter.png" alt-text="Screenshot of extracting parameter.":::
227
+
228
+
-**Extract parameter of type \<data-type>** with allowed values: create a new parameter, and give you an option to update the parameter name:
229
+
230
+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-azure-variable-parameter-type-extract-parameter-with-allowed-values.png" alt-text="Screenshot of extracting parameter with allowed values.":::
231
+
232
+
After the extract, it requires some modification.
233
+
234
+
-**Extract user-defined type**:
235
+
236
+
:::image type="content" source="./media/visual-studio-code/visual-studio-code-azure-variable-parameter-type-extract-parameter-with-allowed-values.png" alt-text="Screenshot of extracting parameter with allowed values.":::
0 commit comments