Skip to content

Commit 860ef8a

Browse files
authored
Merge pull request #287735 from LiSeda/LS_bicep_batch2
LS_Bicep updates_batch 2
2 parents 5b3e42d + 8cfffe2 commit 860ef8a

File tree

7 files changed

+55
-57
lines changed

7 files changed

+55
-57
lines changed

articles/azure-resource-manager/bicep/linter-rule-use-recent-api-versions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ title: Linter rule - use recent API versions
33
description: Linter rule - use recent API versions
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 03/20/2024
6+
ms.date: 10/14/2024
77
---
88

99
# Linter rule - use recent API versions
1010

1111
This rule looks for resource API versions that are older than 730 days. It is recommended to use the most recent API versions.
1212

1313
> [!NOTE]
14-
> This rule is off by default, change the level in [bicepconfig.json](./bicep-config-linter.md) to enable it.
14+
> This rule is off by default. Change the level in [bicepconfig.json](./bicep-config-linter.md) to enable it.
1515
1616
## Linter rule code
1717

1818
Use the following value in the [Bicep configuration file](bicep-config-linter.md) to customize rule settings:
1919

2020
`use-recent-api-versions`
2121

22-
The rule includes a configuration property named `maxAllowedAgeInDays`, with a default value of **730** days (equivalent to 2 years). A value of **0** indicates that the apiVersion must be the latest non-preview version available or the latest preview version if only previews are available.
22+
The rule includes a configuration property named `maxAllowedAgeInDays`, with a default value of **730** days (equivalent to two years). A value of **0** indicates that the API version must be the latest version available not in preview or the latest preview version if only previews are available.
2323

2424
## Solution
2525

26-
Use the most recent API version, or one that is no older than 730 days.
26+
Use the most recent API version or one that isn't older than 730 days.
2727

28-
Use **Quick Fix** to use the latest API versions:
28+
Use **Quick Fix** to use the latest API version:
2929

30-
:::image type="content" source="./media/linter-rule-use-recent-api-versions/linter-rule-use-recent-api-versions-quick-fix.png" alt-text="The screenshot of Simplify interpolation linter rule quick fix.":::
30+
:::image type="content" source="./media/linter-rule-use-recent-api-versions/linter-rule-use-recent-api-versions-quick-fix.png" alt-text="A screenshot of using Quick Fix for the use-recent-api-versions linter rule.":::
3131

3232
## Next steps
3333

articles/azure-resource-manager/bicep/linter-rule-use-recent-module-versions.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ title: Linter rule - use recent module versions
33
description: Linter rule - use recent module versions
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 07/30/2024
6+
ms.date: 10/14/2024
77
---
88

99
# Linter rule - use recent module versions
1010

11-
This rule looks for old [public module](./modules.md#public-module-registry) versions. It's best to use the most recent module versions.
11+
This rule looks for old [public module](./modules.md#public-module-registry) versions. It's recommended to use the most recent module versions.
1212

1313
> [!NOTE]
14-
> This rule is off by default, change the level in [bicepconfig.json](./bicep-config-linter.md) to enable it.
14+
> This rule is off by default. Change the level in [bicepconfig.json](./bicep-config-linter.md) to enable it.
1515
1616
## Linter rule code
1717

18-
To customize rule settings, use the following value in the [Bicep configuration file](bicep-config-linter.md) :
18+
To customize rule settings, use the following value in the [Bicep configuration file](bicep-config-linter.md):
1919

2020
`use-recent-module-versions`
2121

@@ -32,11 +32,9 @@ module storage 'br/public:avm/res/storage/storage-account:0.6.0' = {
3232
}
3333
```
3434

35-
Use the most recent module version.
35+
Use **Quick Fix** to use the latest module version:
3636

37-
Use **Quick Fix** to use the latest module versions:
38-
39-
:::image type="content" source="./media/linter-rule-use-recent-module-versions/linter-rule-use-recent-module-versions-quick-fix.png" alt-text="The screenshot of Simplify interpolation linter rule quick fix.":::
37+
:::image type="content" source="./media/linter-rule-use-recent-module-versions/linter-rule-use-recent-module-versions-quick-fix.png" alt-text="A screenshot of using Quick fix for the use-recent-module-versions linter rule.":::
4038

4139
## Next steps
4240

Loading
Loading
42.5 KB
Loading

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
---
2-
title: Bicep language for deploying Azure resources
3-
description: Describes the Bicep language for deploying infrastructure to Azure. It provides an improved authoring experience over using JSON to develop templates.
2+
title: What is Bicep?
3+
description: Understand the Bicep language for deploying infrastructure to Azure. Gain an improved authoring experience over one with JSON to develop templates.
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 07/05/2024
6+
ms.date: 10/14/2024
77
---
88

99
# What is Bicep?
1010

11-
Bicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources. In a Bicep file, you define the infrastructure you want to deploy to Azure, and then use that file throughout the development lifecycle to repeatedly deploy your infrastructure. Your resources are deployed in a consistent manner.
11+
Bicep is a domain-specific language that uses declarative syntax to deploy Azure resources. In a Bicep file, you define the infrastructure you want to deploy to Azure and then use that file throughout the development lifecycle to repeatedly deploy that infrastructure. Your resources are deployed in a consistent manner.
1212

13-
Bicep provides concise syntax, reliable type safety, and support for code reuse. Bicep offers a first-class authoring experience for your [infrastructure-as-code](/devops/deliver/what-is-infrastructure-as-code) solutions in Azure.
13+
Bicep provides concise syntax, reliable type safety, and support for reusing code. Bicep offers a first-class authoring experience for your [infrastructure-as-code](/devops/deliver/what-is-infrastructure-as-code) solutions in Azure.
1414

1515
## Benefits of Bicep
1616

1717
Bicep provides the following advantages:
1818

19-
- **Support for all resource types and API versions**: Bicep immediately supports all preview and GA versions for Azure services. As soon as a resource provider introduces new resource types and API versions, you can use them in your Bicep file. You don't have to wait for tools to be updated before using the new services.
20-
- **Simple syntax**: When compared to the equivalent JSON template, Bicep files are more concise and easier to read. Bicep requires no previous knowledge of programming languages. Bicep syntax is declarative and specifies which resources and resource properties you want to deploy.
19+
- **Support for all resource types and API versions**: Bicep immediately supports all preview and GA versions for Azure services. As soon as a resource provider introduces new resource types and API versions, you can use them in your Bicep file. You don't need to wait for tools to be updated before using the new services.
20+
- **Simple syntax**: When compared to the equivalent JSON template, Bicep files are more concise and easier to read. Bicep doesn't require prior knowledge of programming languages. Bicep syntax is declarative and specifies which resources and resource properties you want to deploy.
2121

22-
The following examples show the difference between a Bicep file and the equivalent JSON template. Both examples deploy a storage account.
22+
The following examples show the difference between a Bicep file and the equivalent JSON template. Both examples deploy a storage account:
2323

2424
# [Bicep](#tab/bicep)
2525

2626
```bicep
2727
param location string = resourceGroup().location
2828
param storageAccountName string = 'toylaunch${uniqueString(resourceGroup().id)}'
2929
30-
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' = {
30+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
3131
name: storageAccountName
3232
location: location
3333
sku: {
@@ -59,7 +59,7 @@ Bicep provides the following advantages:
5959
"resources": [
6060
{
6161
"type": "Microsoft.Storage/storageAccounts",
62-
"apiVersion": "2023-04-01",
62+
"apiVersion": "2023-05-01",
6363
"name": "[parameters('storageAccountName')]",
6464
"location": "[parameters('location')]",
6565
"sku": {
@@ -76,20 +76,20 @@ Bicep provides the following advantages:
7676

7777
---
7878

79-
- **Authoring experience**: When you use the [Bicep Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep) to create your Bicep files, you get a first-class authoring experience. The editor provides rich type-safety, intellisense, and syntax validation.
79+
- **Authoring experience**: When you use the [Bicep Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep) to create your Bicep files, you get a first-class authoring experience. The editor provides rich type-safety, IntelliSense, and syntax validation.
8080

81-
![Bicep file authoring example](./media/overview/bicep-intellisense.gif)
81+
![A screen capture of authoring a Bicep file in real time](./media/overview/bicep-intellisense.gif)
8282

8383
You can also create Bicep files in Visual Studio with the [Bicep extension for Visual Studio](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.visualstudiobicep).
8484

85-
- **Repeatable results**: Repeatedly deploy your infrastructure throughout the development lifecycle and have confidence your resources are deployed in a consistent manner. Bicep files are idempotent, which means you can deploy the same file many times and get the same resource types in the same state. You can develop one file that represents the desired state, rather than developing lots of separate files to represent updates. For example, the following file creates a storage account. If you deploy this template and the storage account with the specified properties already exists, no changes are made.
85+
- **Repeatable results**: Repeatedly deploy your infrastructure throughout the development lifecycle and have confidence that your resources are deployed in a consistent manner. Bicep files are idempotent, which means that you can deploy the same file many times and get the same resource types in the same state. You can develop one file that represents the desired state instead of developing many separate files to represent updates. For example, the following file creates a storage account. If you deploy this template and the storage account when the specified properties already exist, changes aren't made:
8686

8787
# [Bicep](#tab/bicep)
8888

8989
```bicep
9090
param location string = resourceGroup().location
9191
92-
resource mystore 'Microsoft.Storage/storageAccounts@2023-04-01' = {
92+
resource mystore 'Microsoft.Storage/storageAccounts@2023-05-01' = {
9393
name: 'mystorageaccount'
9494
location: location
9595
sku: {
@@ -114,7 +114,7 @@ Bicep provides the following advantages:
114114
"resources": {
115115
"mystore": {
116116
"type": "Microsoft.Storage/storageAccounts",
117-
"apiVersion": "2023-04-01",
117+
"apiVersion": "2023-05-01",
118118
"name": "mystorageaccount",
119119
"location": "[parameters('location')]",
120120
"sku": {
@@ -128,50 +128,50 @@ Bicep provides the following advantages:
128128

129129
---
130130

131-
- **Orchestration**: You don't have to worry about the complexities of ordering operations. Resource Manager orchestrates the deployment of interdependent resources so they're created in the correct order. When possible, Resource Manager deploys resources in parallel so your deployments finish faster than serial deployments. You deploy the file through one command, rather than through multiple imperative commands.
131+
- **Orchestration**: You don't have to worry about the complexities of ordering operations. Resource Manager orchestrates the deployment of interdependent resources so that they're created in the correct order. When possible, Resource Manager deploys resources in parallel, which helps your deployments to finish faster than serial deployments. You deploy the file through one rather than multiple imperative commands.
132132

133-
:::image type="content" source="./media/overview/bicep-processing.png" alt-text="Bicep deployment comparison" border="false":::
133+
:::image type="content" source="./media/overview/bicep-processing.png" alt-text="A diagram comparing deployment between a Bicep file and infrastructure as code not in a template." border="false":::
134134

135-
- **Modularity**: You can break your Bicep code into manageable parts by using [modules](./modules.md). The module deploys a set of related resources. Modules enable you to reuse code and simplify development. Add the module to a Bicep file anytime you need to deploy those resources.
136-
- **Integration with Azure services**: Bicep is integrated with Azure services such as Azure Policy, template specs, and Blueprints.
137-
- **Preview changes**: You can use the [what-if operation](./deploy-what-if.md) to get a preview of changes before deploying the Bicep file. With what-if, you see which resources will be created, updated, or deleted, and any resource properties that will be changed. The what-if operation checks the current state of your environment and eliminates the need to manage state.
138-
- **No state or state files to manage**: All state is stored in Azure. Users can collaborate and have confidence their updates are handled as expected.
139-
- **No cost and open source**: Bicep is completely free. You don't have to pay for premium capabilities. It's also supported by Microsoft support.
135+
- **Modularity**: You can use [modules](./modules.md) to segment your Bicep code into manageable parts. Modules help you to reuse code and simplify development. A module deploys a set of related resources. Add a module to a Bicep file any time you need to deploy those resources.
136+
- **Integration with Azure services**: Bicep integrates with Azure services such as Azure Policy, template specs, and Azure Blueprints.
137+
- **Preview changes**: You can use the [what-if operation](./deploy-what-if.md) to preview changes before deploying the Bicep file. The what-if operation shows you which resources will be created, updated, or deleted and any resource properties that'll be changed. It also checks the current state of your environment and eliminates the need to manage this state.
138+
- **No state or state files to manage**: All state is stored in Azure. Users can collaborate and be confident that their updates are handled as expected.
139+
- **No cost and open source**: Since Bicep is completely free, you don't have to pay for premium capabilities. It's also supported by Microsoft Support.
140140

141141
## Get started
142142

143143
To start with Bicep:
144144

145-
1. **Install the tools**. See [Set up Bicep development and deployment environments](./install.md). Or, you can use the [VS Code Devcontainer/Codespaces repo](https://github.com/Azure/vscode-remote-try-bicep) to get a pre-configured authoring environment.
146-
2. **Complete the [quickstart](./quickstart-create-bicep-use-visual-studio-code.md) and the [Learn modules for Bicep](./learn-bicep.md)**.
145+
1. **Install the tools**. See [Set up Bicep development and deployment environments](./install.md) or use the [VS Code devcontainer/Codespaces repository](https://github.com/Azure/vscode-remote-try-bicep) to get a pre-configured authoring environment.
146+
2. **Complete the [Quickstart](./quickstart-create-bicep-use-visual-studio-code.md) and [Learn modules for Bicep](./learn-bicep.md)**.
147147

148-
To decompile an existing ARM template to Bicep, see [Decompiling ARM template JSON to Bicep](./decompile.md). You can use the [Bicep Playground](https://aka.ms/bicepdemo) to view Bicep and equivalent JSON side by side.
148+
To decompile an existing Resource Manager template to Bicep, see [Decompiling ARM template JSON to Bicep](./decompile.md). You can use [Bicep Playground](https://aka.ms/bicepdemo) to view Bicep and its equivalent, JSON, side by side.
149149

150-
To learn about the resources that are available in your Bicep file, see [Bicep resource reference](/azure/templates/)
150+
To learn about the resources that are available in your Bicep file, see [Bicep resource reference](/azure/templates/).
151151

152-
Bicep examples can be found in the [Bicep GitHub repo](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts)
152+
Bicep examples can be found in the [Bicep GitHub repo](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts).
153153

154154
## About the language
155155

156-
Bicep isn't intended as a general programming language to write applications. A Bicep file declares Azure resources and resource properties, without writing a sequence of programming commands to create resources.
156+
Bicep isn't intended as a general programming language to write applications. A Bicep file declares Azure resources and resource properties without writing a sequence of programming commands to create them.
157157

158158
To track the status of the Bicep work, see the [Bicep project repository](https://github.com/Azure/bicep).
159159

160-
To learn about Bicep, see the following video.
160+
Watch the following video to learn about Bicep:
161161

162162
> [!VIDEO https://www.youtube.com/embed/sc1kJfcRQgY]
163163
164-
You can use Bicep instead of JSON to develop your Azure Resource Manager templates (ARM templates). The JSON syntax to create an ARM template can be verbose and require complicated expressions. Bicep syntax reduces that complexity and improves the development experience. Bicep is a transparent abstraction over ARM template JSON and doesn't lose any of the JSON template capabilities. During deployment, the Bicep CLI converts a Bicep file into ARM template JSON.
164+
You can use Bicep instead of JSON to develop Resource Manager templates. The JSON syntax to create a Resource Manager template can be verbose and require complicated expressions. Bicep syntax reduces that complexity and improves the development experience. Bicep is a transparent abstraction over a Resource Manager JSON template that doesn't lose the capabilities of a JSON template. During deployment, the Bicep CLI converts a Bicep file into a Resource Manager JSON template.
165165

166-
Resource types, API versions, and properties that are valid in an ARM template are valid in a Bicep file.
166+
Resource types, API versions, and properties that are valid in a Resource Manager template are valid in a Bicep file.
167167

168-
Bicep offers an easier and more concise syntax when compared to the equivalent JSON. You don't use bracketed expressions `[...]`. Instead, you directly call functions, and get values from parameters and variables. You give each deployed resource a symbolic name, which makes it easy to reference that resource in your template.
168+
Bicep offers an easier and more concise syntax when compared to its equivalent, JSON. You don't use bracketed expressions `[...]`. Instead, you directly call functions and get values from parameters and variables. You give each deployed resource a symbolic name, which makes it easy to reference that resource in your template.
169169

170170
For a full comparison of the syntax, see [Comparing JSON and Bicep for templates](compare-template-syntax.md).
171171

172172
Bicep automatically manages dependencies between resources. You can avoid setting `dependsOn` when the symbolic name of a resource is used in another resource declaration.
173173

174-
The structure of the Bicep file is more flexible than the JSON template. You can declare parameters, variables, and outputs anywhere in the file. In JSON, you have to declare all parameters, variables, and outputs within the corresponding sections of the template.
174+
The structure of the Bicep file is more flexible than a JSON template. You can declare parameters, variables, and outputs anywhere in the file. In JSON, you have to declare all parameters, variables, and outputs within the corresponding sections of the template.
175175

176176
[!INCLUDE [Request ARM template support](../../../includes/template-support.md)]
177177

0 commit comments

Comments
 (0)