Skip to content

Commit 0257085

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into fixingTOC
2 parents 60ceac7 + af2fc8b commit 0257085

File tree

10 files changed

+223
-69
lines changed

10 files changed

+223
-69
lines changed

articles/azure-resource-manager/bicep/bicep-config-linter.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Linter settings for Bicep config
33
description: Describes how to customize configuration values for the Bicep linter
44
ms.topic: conceptual
55
ms.custom: devx-track-bicep
6-
ms.date: 04/28/2025
6+
ms.date: 06/19/2025
77
---
88

99
# Add linter settings in the Bicep config file
@@ -37,19 +37,19 @@ The following example shows the rules that are available for configuration.
3737
"level": "off"
3838
},
3939
"max-asserts": {
40-
"level": "warning"
40+
"level": "error"
4141
},
4242
"max-outputs": {
43-
"level": "warning"
43+
"level": "error"
4444
},
4545
"max-params": {
46-
"level": "warning"
46+
"level": "error"
4747
},
4848
"max-resources": {
49-
"level": "warning"
49+
"level": "error"
5050
},
5151
"max-variables": {
52-
"level": "warning"
52+
"level": "error"
5353
},
5454
"nested-deployment-template-scoping": {
5555
"level": "error"
@@ -115,11 +115,11 @@ The following example shows the rules that are available for configuration.
115115
"level": "warning"
116116
},
117117
"use-recent-api-versions": {
118-
"level": "warning",
118+
"level": "off",
119119
"maxAllowedAgeInDays": 730
120120
},
121121
"use-recent-module-versions": {
122-
"level": "warning"
122+
"level": "off"
123123
},
124124
"use-resource-id-functions": {
125125
"level": "off"
@@ -140,7 +140,7 @@ The following example shows the rules that are available for configuration.
140140
"level": "warning"
141141
},
142142
"what-if-short-circuiting": {
143-
"level": "warning"
143+
"level": "off"
144144
}
145145
}
146146
}

articles/azure-resource-manager/bicep/linter-rule-admin-username-should-not-be-literal.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Don't use a literal value or an expression that evaluates to a literal value. In
2323
The following example fails this test because the user name is a literal value.
2424

2525
```bicep
26+
param location string = resourceGroup().location
27+
2628
resource vm 'Microsoft.Compute/virtualMachines@2023-03-01' = {
2729
name: 'name'
2830
location: location
@@ -37,6 +39,8 @@ resource vm 'Microsoft.Compute/virtualMachines@2023-03-01' = {
3739
The next example fails this test because the expression evaluates to a literal value when the default value is used.
3840

3941
```bicep
42+
param location string = resourceGroup().location
43+
4044
var defaultAdmin = 'administrator'
4145
resource vm 'Microsoft.Compute/virtualMachines@2023-03-01' = {
4246
name: 'name'
@@ -54,7 +58,8 @@ This example passes this test.
5458
```bicep
5559
@secure()
5660
param adminUsername string
57-
param location string
61+
param location string = resourceGroup().location
62+
5863
resource vm 'Microsoft.Compute/virtualMachines@2023-03-01' = {
5964
name: 'name'
6065
location: location

articles/azure-resource-manager/bicep/linter-rule-explicit-values-for-loc-params.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ title: Linter rule - use explicit values for module location parameters
33
description: Linter rule - use explicit values for module location parameters.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 02/12/2025
6+
ms.date: 06/19/2025
77
---
88

99
# Linter rule - use explicit values for module location parameters
1010

1111
This rule finds module parameters that are used for resource locations and may inadvertently default to an unexpected value.
1212

13+
> [!NOTE]
14+
> This rule is off by default. Change the level in [bicepconfig.json](./bicep-config-linter.md) to enable it.
15+
1316
## Linter rule code
1417

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

articles/azure-resource-manager/bicep/linter-rule-no-hardcoded-location.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ title: Linter rule - no hardcoded locations
33
description: Linter rule - no hardcoded locations
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 02/12/2025
6+
ms.date: 06/19/2025
77
---
88

99
# Linter rule - no hardcoded locations
1010

1111
This rule finds uses of Azure location values that aren't parameterized.
1212

13+
> [!NOTE]
14+
> This rule is off by default. Change the level in [bicepconfig.json](./bicep-config-linter.md) to enable it.
15+
1316
## Linter rule code
1417

1518
Use the following value in the [Bicep configuration file](bicep-config-linter.md) to customize rule settings:
@@ -25,18 +28,29 @@ Rather than using a hardcoded string or variable value, use a parameter, the str
2528
The following example fails this test because the resource's `location` property uses a string literal:
2629

2730
```bicep
28-
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
29-
location: 'westus'
31+
resource stg 'Microsoft.Storage/storageAccounts@2024-01-01' = {
32+
name: 'stg'
33+
location: 'westus'
34+
kind: 'StorageV2'
35+
sku: {
36+
name: 'Premium_LRS'
3037
}
38+
}
3139
```
3240

3341
You can fix it by creating a new `location` string parameter (which may optionally have a default value - resourceGroup().location is frequently used as a default):
3442

3543
```bicep
36-
param location string = resourceGroup().location
37-
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
38-
location: location
44+
param location string = resourceGroup().location
45+
46+
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
47+
name: 'stg${uniqueString(resourceGroup().id)}'
48+
location: location
49+
kind: 'StorageV2'
50+
sku: {
51+
name: 'Premium_LRS'
3952
}
53+
}
4054
```
4155

4256
Use **Quick Fix** to create a location parameter and replace the string literal with the parameter name. See the following screenshot:
@@ -46,19 +60,19 @@ Use **Quick Fix** to create a location parameter and replace the string literal
4660
The following example fails this test because the resource's `location` property uses a variable with a string literal.
4761

4862
```bicep
49-
var location = 'westus'
50-
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
51-
location: location
52-
}
63+
var location = 'westus'
64+
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
65+
location: location
66+
}
5367
```
5468

5569
You can fix it by turning the variable into a parameter:
5670

5771
```bicep
58-
param location string = 'westus'
59-
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
60-
location: location
61-
}
72+
param location string = 'westus'
73+
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' = {
74+
location: location
75+
}
6276
```
6377

6478
The following example fails this test because a string literal is being passed in to a module parameter that is in turn used for a resource's `location` property:

articles/azure-resource-manager/bicep/linter-rule-no-loc-expr-outside-params.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ title: Linter rule - no location expressions outside of parameter default values
33
description: Linter rule - no location expressions outside of parameter default values
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 02/12/2025
6+
ms.date: 06/19/2025
77
---
88

99
# Linter rule - no location expressions outside of parameter default values
1010

1111
This rule finds `resourceGroup().location` or `deployment().location` used outside of a parameter default value.
1212

13+
> [!NOTE]
14+
> This rule is off by default. Change the level in [bicepconfig.json](./bicep-config-linter.md) to enable it.
15+
1316
## Linter rule code
1417

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

articles/azure-resource-manager/bicep/linter-rule-what-if-short-circuiting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Linter rule - what-if short circuiting
33
description: Linter rule - what-if short circuiting
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 02/12/2025
6+
ms.date: 06/19/2025
77
---
88

99
# Linter rule - what-if short circuiting

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

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use Bicep linter
33
description: Learn how to use Bicep linter.
44
ms.topic: how-to
55
ms.custom: devx-track-bicep
6-
ms.date: 06/06/2025
6+
ms.date: 06/19/2025
77
---
88

99
# Use Bicep linter
@@ -12,51 +12,53 @@ The Bicep linter checks Bicep files for syntax errors and best practice violatio
1212

1313
## Linter requirements
1414

15-
The linter is integrated into the Bicep CLI and the Bicep extension for Visual Studio Code. To use it, you must have version **0.4 or later**.
15+
The linter is integrated into the Bicep CLI and the Bicep extension for Visual Studio Code. To use it, you must have [Bicep CLI version 0.4 or later](https://github.com/Azure/bicep/releases/tag/v0.4.1).
1616

1717
## Default rules
1818

1919
The default set of linter rules is minimal and taken from [arm-ttk test cases](../templates/template-test-cases.md). The extension and Bicep CLI check the following rules, which are set to the warning level.
2020

21-
- [adminusername-should-not-be-literal](./linter-rule-admin-username-should-not-be-literal.md)
22-
- [artifacts-parameters](./linter-rule-artifacts-parameters.md)
23-
- [decompiler-cleanup](./linter-rule-decompiler-cleanup.md)
24-
- [explicit-values-for-loc-params](./linter-rule-explicit-values-for-loc-params.md)
25-
- [max-asserts](./linter-rule-max-asserts.md)
26-
- [max-outputs](./linter-rule-max-outputs.md)
27-
- [max-params](./linter-rule-max-parameters.md)
28-
- [max-resources](./linter-rule-max-resources.md)
29-
- [max-variables](./linter-rule-max-variables.md)
30-
- [nested-deployment-template-scoping](./linter-rule-nested-deployment-template-scoping.md)
31-
- [no-conflicting-metadata](./linter-rule-no-conflicting-metadata.md)
32-
- [no-deployments-resources](./linter-rule-no-deployments-resources.md)
33-
- [no-hardcoded-env-urls](./linter-rule-no-hardcoded-environment-urls.md)
34-
- [no-hardcoded-location](./linter-rule-no-hardcoded-location.md)
35-
- [no-loc-expr-outside-params](./linter-rule-no-loc-expr-outside-params.md)
36-
- [no-unnecessary-dependson](./linter-rule-no-unnecessary-dependson.md)
37-
- [no-unused-existing-resources](./linter-rule-no-unused-existing-resources.md)
38-
- [no-unused-imports](./linter-rule-no-unused-imports.md)
39-
- [no-unused-params](./linter-rule-no-unused-parameters.md)
40-
- [no-unused-vars](./linter-rule-no-unused-variables.md)
41-
- [outputs-should-not-contain-secrets](./linter-rule-outputs-should-not-contain-secrets.md)
42-
- [prefer-interpolation](./linter-rule-prefer-interpolation.md)
43-
- [prefer-unquoted-property-names](./linter-rule-prefer-unquoted-property-names.md)
44-
- [protect-commandtoexecute-secrets](./linter-rule-use-protectedsettings-for-commandtoexecute-secrets.md)
45-
- [secure-parameter-default](./linter-rule-secure-parameter-default.md)
46-
- [secure-params-in-nested-deploy](./linter-rule-secure-params-in-nested-deploy.md)
47-
- [secure-secrets-in-params](./linter-rule-secure-secrets-in-parameters.md)
48-
- [simplify-interpolation](./linter-rule-simplify-interpolation.md)
49-
- [simplify-json-null](./linter-rule-simplify-json-null.md)
50-
- [use-parent-property](./linter-rule-use-parent-property.md)
51-
- [use-recent-api-versions](./linter-rule-use-recent-api-versions.md)
52-
- [use-recent-module-versions](./linter-rule-use-recent-module-versions.md)
53-
- [use-resource-id-functions](./linter-rule-use-resource-id-functions.md)
54-
- [use-resource-symbol-reference](./linter-rule-use-resource-symbol-reference.md)
55-
- [use-safe-access](./linter-rule-use-safe-access.md)
56-
- [use-secure-value-for-secure-inputs](./linter-rule-use-secure-value-for-secure-inputs.md)
57-
- [use-stable-resource-identifiers](./linter-rule-use-stable-resource-identifier.md)
58-
- [use-stable-vm-image](./linter-rule-use-stable-vm-image.md)
59-
- [what-if-short-circuiting](./linter-rule-what-if-short-circuiting.md)
21+
| Linter rule | Default level |
22+
| --- | --- |
23+
| <a id='adminusername-should-not-be-literal' />[adminusername-should-not-be-literal](./linter-rule-admin-username-should-not-be-literal.md) | warning |
24+
| <a id='artifacts-parameters' />[artifacts-parameters](./linter-rule-artifacts-parameters.md) | warning |
25+
| <a id='decompiler-cleanup' />[decompiler-cleanup](./linter-rule-decompiler-cleanup.md) | warning |
26+
| <a id='explicit-values-for-loc-params' />[explicit-values-for-loc-params](./linter-rule-explicit-values-for-loc-params.md) | off |
27+
| <a id='max-asserts' />[max-asserts](./linter-rule-max-asserts.md) | error |
28+
| <a id='max-outputs' />[max-outputs](./linter-rule-max-outputs.md) | error |
29+
| <a id='max-params' />[max-params](./linter-rule-max-parameters.md) | error |
30+
| <a id='max-resources' />[max-resources](./linter-rule-max-resources.md) | error |
31+
| <a id='max-variables' />[max-variables](./linter-rule-max-variables.md) | error |
32+
| <a id='nested-deployment-template-scoping' />[nested-deployment-template-scoping](./linter-rule-nested-deployment-template-scoping.md) | error |
33+
| <a id='no-conflicting-metadata' />[no-conflicting-metadata](./linter-rule-no-conflicting-metadata.md) | warning |
34+
| <a id='no-deployments-resources' />[no-deployments-resources](./linter-rule-no-deployments-resources.md) | warning |
35+
| <a id='no-hardcoded-env-urls' />[no-hardcoded-env-urls](./linter-rule-no-hardcoded-environment-urls.md) | warning |
36+
| <a id='no-hardcoded-location' />[no-hardcoded-location](./linter-rule-no-hardcoded-location.md) | off |
37+
| <a id='no-loc-expr-outside-params' />[no-loc-expr-outside-params](./linter-rule-no-loc-expr-outside-params.md) | off |
38+
| <a id='no-unnecessary-dependson' />[no-unnecessary-dependson](./linter-rule-no-unnecessary-dependson.md) | warning |
39+
| <a id='no-unused-existing-resources' />[no-unused-existing-resources](./linter-rule-no-unused-existing-resources.md) | warning |
40+
| <a id='no-unused-imports' />[no-unused-imports](./linter-rule-no-unused-imports.md) | warning |
41+
| <a id='no-unused-params' />[no-unused-params](./linter-rule-no-unused-parameters.md) | warning |
42+
| <a id='no-unused-vars' />[no-unused-vars](./linter-rule-no-unused-variables.md) | warning |
43+
| <a id='outputs-should-not-contain-secrets' />[outputs-should-not-contain-secrets](./linter-rule-outputs-should-not-contain-secrets.md) | warning |
44+
| <a id='prefer-interpolation' />[prefer-interpolation](./linter-rule-prefer-interpolation.md) | warning |
45+
| <a id='prefer-unquoted-property-names' />[prefer-unquoted-property-names](./linter-rule-prefer-unquoted-property-names.md) | warning |
46+
| <a id='protect-commandtoexecute-secrets' />[protect-commandtoexecute-secrets](./linter-rule-use-protectedsettings-for-commandtoexecute-secrets.md) | warning |
47+
| <a id='secure-parameter-default' />[secure-parameter-default](./linter-rule-secure-parameter-default.md) | warning |
48+
| <a id='secure-params-in-nested-deploy' />[secure-params-in-nested-deploy](./linter-rule-secure-params-in-nested-deploy.md) | warning |
49+
| <a id='secure-secrets-in-params' />[secure-secrets-in-params](./linter-rule-secure-secrets-in-parameters.md) | warning |
50+
| <a id='simplify-interpolation' />[simplify-interpolation](./linter-rule-simplify-interpolation.md) | warning |
51+
| <a id='simplify-json-null' />[simplify-json-null](./linter-rule-simplify-json-null.md) | warning |
52+
| <a id='use-parent-property' />[use-parent-property](./linter-rule-use-parent-property.md) | warning |
53+
| <a id='use-recent-api-versions' />[use-recent-api-versions](./linter-rule-use-recent-api-versions.md) | off |
54+
| <a id='use-recent-module-versions' />[use-recent-module-versions](./linter-rule-use-recent-module-versions.md) | off |
55+
| <a id='use-resource-id-functions' />[use-resource-id-functions](./linter-rule-use-resource-id-functions.md) | off |
56+
| <a id='use-resource-symbol-reference' />[use-resource-symbol-reference](./linter-rule-use-resource-symbol-reference.md) | warning |
57+
| <a id='use-safe-access' />[use-safe-access](./linter-rule-use-safe-access.md) | warning |
58+
| <a id='use-secure-value-for-secure-inputs' />[use-secure-value-for-secure-inputs](./linter-rule-use-secure-value-for-secure-inputs.md) | warning |
59+
| <a id='use-stable-resource-identifiers' />[use-stable-resource-identifiers](./linter-rule-use-stable-resource-identifier.md) | warning |
60+
| <a id='use-stable-vm-image' />[use-stable-vm-image](./linter-rule-use-stable-vm-image.md) | warning |
61+
| <a id='what-if-short-circuiting' />[what-if-short-circuiting](./linter-rule-what-if-short-circuiting.md) | off |
6062

6163
You can enable or disable all linter rules and control how they are applied using a configuration file. To override the default behavior, create a **bicepconfig.json** file with your custom settings. For more information about applying those settings, see [Add custom settings in the Bicep config file](bicep-config-linter.md).
6264

articles/communication-services/concepts/identity-model.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,21 @@ You can create Azure Communication Service user identities for free. The only ch
3131

3232
Managing a mapping between Azure Communication Services user identities and your own identity system is your responsibility as a developer, and doesn't come built-in. For example, you can add a `CommunicationServicesId` column in your existing user table to store the associated Azure Communication Services identity. A mapping design is described in more detail under [Client-server architecture](#client-server-architecture).
3333

34-
## Access tokens
34+
## (Preview) Simplify identity mapping with `customId`
35+
36+
> [!IMPORTANT]
37+
> This feature is available starting with the Identity SDK version `1.4.0-beta1` and REST API version `2025-03-02-preview`.
38+
39+
> [!NOTE]
40+
> This feature is currently in preview.
41+
42+
Previously, developers were responsible for maintaining a mapping between their own user identity system and Azure Communication Services identities. With the introduction of the `customId` parameter, you can now associate your own user identifiers—such as email addresses or internal user IDs—directly when creating a Communication Services identity.
43+
44+
When you create a user with a `customId`, Azure Communication Services will return the same identity if you call the method again with the same `customId`. This eliminates the need to store and manage the mapping yourself.
45+
46+
This feature is supported in both the SDK and REST API, and is especially useful for scenarios where you want to maintain a consistent identity across sessions, devices, or services without additional storage overhead.
47+
48+
## Access tokens
3549

3650
After you create a user identity, the end-user then needs an access token with specific scopes to participate in communications using chat or calls. For example, only a user with a token of `chat` scope can participate in chat. Only a user with a token of `voip` scope can participate in a VoIP call.
3751

0 commit comments

Comments
 (0)