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/bicep-cli.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Bicep CLI commands and overview
3
3
description: Describes the commands that you can use in the Bicep CLI. These commands include building Azure Resource Manager templates from Bicep.
4
4
ms.topic: conceptual
5
-
ms.date: 03/15/2022
5
+
ms.date: 06/30/2022
6
6
---
7
7
8
8
# Bicep CLI commands
@@ -41,6 +41,9 @@ az bicep build --file main.bicep --stdout
41
41
42
42
If your Bicep file includes a module that references an external registry, the build command automatically calls [restore](#restore). The restore command gets the file from the registry and stores it in the local cache.
43
43
44
+
> [!NOTE]
45
+
> The restore command doesn't refresh the cache. For more information, see [restore](#restore).
46
+
44
47
To not call restore automatically, use the `--no-restore` switch:
45
48
46
49
```azurecli
@@ -149,7 +152,7 @@ To use the restore command, you must have Bicep CLI version **0.4.1008 or later*
149
152
To manually restore the external modules for a file, use:
150
153
151
154
```powershell
152
-
bicep restore <bicep-file>
155
+
bicep restore <bicep-file> [--force]
153
156
```
154
157
155
158
The Bicep file you provide is the file you wish to deploy. It must contain a module that links to a registry. For example, you can restore the following file:
@@ -177,6 +180,8 @@ The local cache is found in:
177
180
/home/<username>/.bicep
178
181
```
179
182
183
+
The `restore` command doesn't refresh the cache if a module is already cached. To fresh the cache, you can either delete the module path from the cache or use the `--force` switch with the `restore` command.
184
+
180
185
## upgrade
181
186
182
187
The `upgrade` command updates your installed version with the latest version. This command is only available through Azure CLI.
0 commit comments