Skip to content

Commit 0ab99ca

Browse files
Merge pull request #212918 from mumian/0928-bicep-decompile
introduce rename symbol
2 parents b82342d + 5e9b5af commit 0ab99ca

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Decompile ARM template JSON to Bicep
33
description: Describes commands for decompiling Azure Resource Manager templates to Bicep files.
44
ms.topic: conceptual
5-
ms.date: 07/18/2022
5+
ms.date: 09/28/2022
66
ms.custom: devx-track-azurepowershell
77
---
88

@@ -123,23 +123,12 @@ The decompiled file works, but it has some names that you might want to change.
123123
var uniqueStorageName = 'store${uniqueString(resourceGroup().id)}'
124124
```
125125

126-
The resource has a symbolic name that you might want to change. Instead of `storageAccountName` for the symbolic name, use `exampleStorage`.
127-
128-
```bicep
129-
resource exampleStorage 'Microsoft.Storage/storageAccounts@2019-06-01' = {
130-
```
126+
To rename across the file, right-click the name, and then select **Rename symbol**. You can also use the **F2** hotkey.
131127

132-
Since you changed the name of the variable for the storage account name, you need to change where it's used.
128+
The resource has a symbolic name that you might want to change. Instead of `storageAccountName` for the symbolic name, use `exampleStorage`.
133129

134130
```bicep
135131
resource exampleStorage 'Microsoft.Storage/storageAccounts@2019-06-01' = {
136-
name: uniqueStorageName
137-
```
138-
139-
And in the output, use:
140-
141-
```bicep
142-
output storageAccountName string = uniqueStorageName
143132
```
144133

145134
The complete file is:

0 commit comments

Comments
 (0)