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/linter-rule-use-recent-api-versions.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,31 +3,31 @@ title: Linter rule - use recent API versions
3
3
description: Linter rule - use recent API versions
4
4
ms.topic: reference
5
5
ms.custom: devx-track-bicep
6
-
ms.date: 03/20/2024
6
+
ms.date: 10/14/2024
7
7
---
8
8
9
9
# Linter rule - use recent API versions
10
10
11
11
This rule looks for resource API versions that are older than 730 days. It is recommended to use the most recent API versions.
12
12
13
13
> [!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.
15
15
16
16
## Linter rule code
17
17
18
18
Use the following value in the [Bicep configuration file](bicep-config-linter.md) to customize rule settings:
19
19
20
20
`use-recent-api-versions`
21
21
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.
23
23
24
24
## Solution
25
25
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.
:::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.":::
:::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.":::
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/overview.md
+33-33Lines changed: 33 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,33 @@
1
1
---
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.
4
4
ms.topic: conceptual
5
5
ms.custom: devx-track-bicep
6
-
ms.date: 07/05/2024
6
+
ms.date: 10/14/2024
7
7
---
8
8
9
9
# What is Bicep?
10
10
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.
12
12
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.
14
14
15
15
## Benefits of Bicep
16
16
17
17
Bicep provides the following advantages:
18
18
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.
21
21
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:
@@ -59,7 +59,7 @@ Bicep provides the following advantages:
59
59
"resources": [
60
60
{
61
61
"type": "Microsoft.Storage/storageAccounts",
62
-
"apiVersion": "2023-04-01",
62
+
"apiVersion": "2023-05-01",
63
63
"name": "[parameters('storageAccountName')]",
64
64
"location": "[parameters('location')]",
65
65
"sku": {
@@ -76,20 +76,20 @@ Bicep provides the following advantages:
76
76
77
77
---
78
78
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.

82
82
83
83
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).
84
84
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:
@@ -114,7 +114,7 @@ Bicep provides the following advantages:
114
114
"resources": {
115
115
"mystore": {
116
116
"type": "Microsoft.Storage/storageAccounts",
117
-
"apiVersion": "2023-04-01",
117
+
"apiVersion": "2023-05-01",
118
118
"name": "mystorageaccount",
119
119
"location": "[parameters('location')]",
120
120
"sku": {
@@ -128,50 +128,50 @@ Bicep provides the following advantages:
128
128
129
129
---
130
130
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.
:::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":::
134
134
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.
140
140
141
141
## Get started
142
142
143
143
To start with Bicep:
144
144
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)**.
147
147
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.
149
149
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/).
151
151
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).
153
153
154
154
## About the language
155
155
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.
157
157
158
158
To track the status of the Bicep work, see the [Bicep project repository](https://github.com/Azure/bicep).
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.
165
165
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.
167
167
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.
169
169
170
170
For a full comparison of the syntax, see [Comparing JSON and Bicep for templates](compare-template-syntax.md).
171
171
172
172
Bicep automatically manages dependencies between resources. You can avoid setting `dependsOn` when the symbolic name of a resource is used in another resource declaration.
173
173
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.
175
175
176
176
[!INCLUDE [Request ARM template support](../../../includes/template-support.md)]
0 commit comments