Skip to content

Commit 5b3e42d

Browse files
authored
Merge pull request #287679 from LiSeda/LS_bicep_batch1
LS_Bicep updates_batch 1
2 parents 555b9a6 + ce4af91 commit 5b3e42d

File tree

10 files changed

+34
-34
lines changed

10 files changed

+34
-34
lines changed

articles/azure-resource-manager/bicep/linter-rule-no-unused-existing-resources.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Linter rule - no unused existing resources
33
description: Linter rule - no unused existing resources
44
ms.topic: reference
55
ms.custom: devx-track-bicep
6-
ms.date: 07/11/2024
6+
ms.date: 10/14/2024
77
---
88

99
# Linter rule - no unused existing resources
@@ -23,14 +23,14 @@ To reduce confusion in your template, delete any [existing resources](./existing
2323
The following example fails this test because the existing resource **stg** is declared but never used:
2424

2525
```bicep
26-
resource stg 'Microsoft.Storage/storageAccounts@2023-04-01' existing = {
26+
resource stg 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
2727
name: 'examplestorage'
2828
}
2929
```
3030

31-
Use **Quick Fix** to remove the unused existing resource.
31+
Use **Quick Fix** to remove the unused existing resource:
3232

33-
:::image type="content" source="./media/linter-rule-no-unused-existing-resources/linter-rule-no-unused-existing-resources-quick-fix.png" alt-text="The screenshot of No unused existing resources linter rule quick fix.":::
33+
:::image type="content" source="./media/linter-rule-no-unused-existing-resources/linter-rule-no-unused-existing-resources-quick-fix.png" alt-text="A screenshot using Quick Fix for the no-unused-existing-resources linter rule.":::
3434

3535
## Next steps
3636

articles/azure-resource-manager/bicep/linter-rule-no-unused-parameters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Linter rule - no unused parameters
33
description: Linter rule - no unused parameters
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 - no unused parameters
@@ -18,11 +18,11 @@ Use the following value in the [Bicep configuration file](bicep-config-linter.md
1818

1919
## Solution
2020

21-
To reduce confusion in your template, delete any parameters that are defined but not used. This test finds any parameters that aren't used anywhere in the template. Eliminating unused parameters also makes it easier to deploy your template because you don't have to provide unnecessary values.
21+
To reduce confusion in your template, delete any parameters that are defined but not used. This test finds all parameters that aren't used anywhere in the template. Eliminating unused parameters also makes it easier to deploy your template because you don't have to provide unnecessary values.
2222

23-
You can use **Quick Fix** to remove the unused parameters:
23+
Use **Quick Fix** to remove the unused parameters:
2424

25-
:::image type="content" source="./media/linter-rule-no-unused-parameters/linter-rule-no-unused-parameters-quick-fix.png" alt-text="The screenshot of No unused parameters linter rule quick fix.":::
25+
:::image type="content" source="./media/linter-rule-no-unused-parameters/linter-rule-no-unused-parameters-quick-fix.png" alt-text="A screenshot of using Quick Fix for the no-unused-parameters linter rule.":::
2626

2727
## Next steps
2828

articles/azure-resource-manager/bicep/linter-rule-no-unused-variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Linter rule - no unused variables
33
description: Linter rule - no unused variables
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 - no unused variables
@@ -18,11 +18,11 @@ Use the following value in the [Bicep configuration file](bicep-config-linter.md
1818

1919
## Solution
2020

21-
To reduce confusion in your template, delete any variables that are defined but not used. This test finds any variables that aren't used anywhere in the template.
21+
To reduce confusion in your template, delete any variables that are defined but not used. This test finds all variables that aren't used anywhere in the template.
2222

23-
You can use **Quick Fix** to remove the unused variables:
23+
Use **Quick Fix** to remove the unused variables:
2424

25-
:::image type="content" source="./media/linter-rule-no-unused-variables/linter-rule-no-unused-variables-quick-fix.png" alt-text="The screenshot of No unused variables linter rule quick fix.":::
25+
:::image type="content" source="./media/linter-rule-no-unused-variables/linter-rule-no-unused-variables-quick-fix.png" alt-text="A screenshot of using Quick Fix for the no-unused-variables linter rule.":::
2626

2727
## Next steps
2828

articles/azure-resource-manager/bicep/linter-rule-use-parent-property.md

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

99
# Linter rule - use parent property
1010

11-
When defined outside of the parent resource, you use slashes to include the parent name in the name of the child resource. Setting the full resource name with parent resource name is not recommended. The `parent` property can be used to simplify the syntax. See [Full resource name outside parent](./child-resource-name-type.md#full-resource-name-outside-parent).
11+
When defined outside of the parent resource, you use slashes to include the parent name in the name of the child resource. Defining the full resource name with the parent resource name isn't recommended. The `parent` property can be used to simplify the syntax. See [Full resource name outside parent](./child-resource-name-type.md#full-resource-name-outside-parent).
1212

1313
## Linter rule code
1414

@@ -23,7 +23,7 @@ The following example fails this test because of the name values for `service` a
2323
```bicep
2424
param location string = resourceGroup().location
2525
26-
resource storage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
26+
resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = {
2727
name: 'examplestorage'
2828
location: location
2929
kind: 'StorageV2'
@@ -32,14 +32,14 @@ resource storage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
3232
}
3333
}
3434
35-
resource service 'Microsoft.Storage/storageAccounts/fileServices@2023-04-01' = {
35+
resource service 'Microsoft.Storage/storageAccounts/fileServices@2023-05-01' = {
3636
name: 'examplestorage/default'
3737
dependsOn: [
3838
storage
3939
]
4040
}
4141
42-
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2023-04-01' = {
42+
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2023-05-01' = {
4343
name: 'examplestorage/default/exampleshare'
4444
dependsOn: [
4545
service
@@ -52,7 +52,7 @@ You can fix the problem by using the `parent` property:
5252
```bicep
5353
param location string = resourceGroup().location
5454
55-
resource storage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
55+
resource storage 'Microsoft.Storage/storageAccounts@2023-05-01' = {
5656
name: 'examplestorage'
5757
location: location
5858
kind: 'StorageV2'
@@ -61,20 +61,20 @@ resource storage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
6161
}
6262
}
6363
64-
resource service 'Microsoft.Storage/storageAccounts/fileServices@2023-04-01' = {
64+
resource service 'Microsoft.Storage/storageAccounts/fileServices@2023-05-01' = {
6565
parent: storage
6666
name: 'default'
6767
}
6868
69-
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2023-04-01' = {
69+
resource share 'Microsoft.Storage/storageAccounts/fileServices/shares@2023-05-01' = {
7070
parent: service
7171
name: 'exampleshare'
7272
}
7373
```
7474

75-
You can fix the issue automatically by selecting **Quick Fix** as shown on the following screenshot:
75+
Use **Quick Fix** to simplify the syntax:
7676

77-
:::image type="content" source="./media/linter-rule-use-parent-property/bicep-linter-rule-use-parent-property-quick-fix.png" alt-text="Screenshot of use parent property quick fix.":::
77+
:::image type="content" source="./media/linter-rule-use-parent-property/bicep-linter-rule-use-parent-property-quick-fix.png" alt-text="A screenshot of using Quick Fix for the use-parent-property linter rule.":::
7878

7979
## Next steps
8080

articles/azure-resource-manager/bicep/linter-rule-use-resource-symbol-reference.md

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

99
# Linter rule - use resource symbol reference
1010

11-
This rule detects suboptimal uses of the [`reference`](./bicep-functions-resource.md#reference), and [`list`](./bicep-functions-resource.md#list) functions. Instead of invoking these functions, using a resource reference simplifies the syntax and allows Bicep to better understand your deployment dependency graph.
11+
This rule detects suboptimal uses of the [`reference`](./bicep-functions-resource.md#reference) and [`list`](./bicep-functions-resource.md#list) functions. Instead of invoking these functions, using a resource reference simplifies the syntax and allows Bicep to better understand your deployment dependency graph.
1212

1313
## Linter rule code
1414

@@ -27,7 +27,7 @@ param clusterName string
2727
@description('These credentials can be used to submit jobs to the cluster and to log into cluster dashboards.')
2828
param clusterLoginUserName string
2929
30-
@description('The password must be at least 10 characters in length and must contain at least one digit, one upper case letter, one lower case letter, and one non-alphanumeric character except (single-quote, double-quote, backslash, right-bracket, full-stop). Also, the password must not contain 3 consecutive characters from the cluster username or SSH username.')
30+
@description('The password must be at least 10 characters in length and must contain at least one digit, one uppercase letter, one lowercase letter, and one non-alphanumeric character (except single-quote, double-quote, backslash, right-bracket, or full-stop characters). Also, the password must not contain three consecutive characters from the cluster username or SSH username.')
3131
@minLength(10)
3232
@secure()
3333
param clusterLoginPassword string
@@ -37,11 +37,11 @@ param location string = resourceGroup().location
3737
3838
param storageAccountName string = uniqueString(resourceGroup().id)
3939
40-
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' existing = {
40+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
4141
name: storageAccountName
4242
}
4343
44-
resource cluster 'Microsoft.HDInsight/clusters@2023-08-15-preview' = {
44+
resource cluster 'Microsoft.HDInsight/clusters@2024-08-01-preview' = {
4545
name: clusterName
4646
location: location
4747
properties: {
@@ -60,10 +60,10 @@ resource cluster 'Microsoft.HDInsight/clusters@2023-08-15-preview' = {
6060
storageProfile: {
6161
storageaccounts: [
6262
{
63-
name: replace(replace(reference(storageAccount.id, '2023-04-01').primaryEndpoints.blob, 'https://', ''), '/', '')
63+
name: replace(replace(reference(storageAccount.id, '2023-05-01').primaryEndpoints.blob, 'https://', ''), '/', '')
6464
isDefault: true
6565
container: clusterName
66-
key: listKeys(storageAccount.id, '2023-04-01').keys[0].value
66+
key: listKeys(storageAccount.id, '2023-05-01').keys[0].value
6767
}
6868
]
6969
}
@@ -80,7 +80,7 @@ param clusterName string
8080
@description('These credentials can be used to submit jobs to the cluster and to log into cluster dashboards.')
8181
param clusterLoginUserName string
8282
83-
@description('The password must be at least 10 characters in length and must contain at least one digit, one upper case letter, one lower case letter, and one non-alphanumeric character except (single-quote, double-quote, backslash, right-bracket, full-stop). Also, the password must not contain 3 consecutive characters from the cluster username or SSH username.')
83+
@description('The password must be at least 10 characters in length and must contain at least one digit, one uppercase letter, one lowercase letter, and one non-alphanumeric character (except single-quote, double-quote, backslash, right-bracket, or full-stop characters). Also, the password must not contain three consecutive characters from the cluster username or SSH username.')
8484
@minLength(10)
8585
@secure()
8686
param clusterLoginPassword string
@@ -90,11 +90,11 @@ param location string = resourceGroup().location
9090
9191
param storageAccountName string = uniqueString(resourceGroup().id)
9292
93-
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' existing = {
93+
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
9494
name: storageAccountName
9595
}
9696
97-
resource cluster 'Microsoft.HDInsight/clusters@2023-08-15-preview' = {
97+
resource cluster 'Microsoft.HDInsight/clusters@2024-08-01-preview' = {
9898
name: clusterName
9999
location: location
100100
properties: {
@@ -124,9 +124,9 @@ resource cluster 'Microsoft.HDInsight/clusters@2023-08-15-preview' = {
124124
}
125125
```
126126

127-
You can fix the issue automatically by selecting **Quick Fix** as shown on the following screenshot:
127+
Use **Quick Fix** to simplify the syntax:
128128

129-
:::image type="content" source="./media/linter-rule-use-resource-symbol-reference/bicep-linter-rule-use-resource-symbol-reference-quick-fix.png" alt-text="Screenshot of use resource symbol reference quick fix." lightbox="./media/linter-rule-use-resource-symbol-reference/bicep-linter-rule-use-resource-symbol-reference-quick-fix.png":::
129+
:::image type="content" source="./media/linter-rule-use-resource-symbol-reference/bicep-linter-rule-use-resource-symbol-reference-quick-fix.png" alt-text="A screenshot of using Quick fix for the use-resource-symbol-reference linter rule." lightbox="./media/linter-rule-use-resource-symbol-reference/bicep-linter-rule-use-resource-symbol-reference-quick-fix.png":::
130130

131131
## Next steps
132132

Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)