Skip to content

Commit 9e90787

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into waf-copilot
2 parents 41bea58 + 4802332 commit 9e90787

28 files changed

+270
-68
lines changed

articles/api-management/llm-semantic-cache-lookup-policy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ Use the `llm-semantic-cache-lookup` policy to perform cache lookup of responses
6868
- This policy can only be used once in a policy section.
6969
- Fine-tune the value of `score-threshold` based on your application to ensure that the right sensitivity is used when determining which queries to cache. Start with a low value such as 0.05 and adjust to optimize the ratio of cache hits to misses.
7070
- The embeddings model should have enough capacity and sufficient context size to accommodate the prompt volume and prompts.
71+
- Score threshold above 0.2 may lead to cache mismatch. Consider using lower value for sensitive use cases.
72+
- Control cross-user access to cache entries by specifying `vary-by`with specific user or user-group identifiers.
73+
- Consider adding [llm-content-safety](./llm-content-safety-policy.md) policy with prompt shield to protect from prompt attacks.
7174

7275

7376
## Examples

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ The following example shows the rules that are available for configuration.
7575
"no-unused-existing-resources": {
7676
"level": "warning"
7777
},
78+
"no-unused-imports": {
79+
"level": "warning"
80+
},
7881
"no-unused-params": {
7982
"level": "warning"
8083
},

articles/azure-resource-manager/bicep/bicep-core-diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.custom:
77
- devx-track-bicep
88
- devx-track-arm-template
99
- build-2025
10-
ms.date: 05/20/2025
10+
ms.date: 06/06/2025
1111
---
1212

1313
# Bicep core diagnostics
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Linter rule - no unused imports
3+
description: Linter rule - no unused imports
4+
ms.topic: reference
5+
ms.custom: devx-track-bicep
6+
ms.date: 06/06/2025
7+
---
8+
9+
# Linter rule - no unused imports
10+
11+
This rule finds [import alias](./bicep-import.md#import-variables-types-and-functions) that aren't referenced anywhere in the Bicep file.
12+
13+
## Linter rule code
14+
15+
Use the following value in the [Bicep configuration file](bicep-config-linter.md) to customize rule settings:
16+
17+
`no-unused-imports`
18+
19+
## Solution
20+
21+
To reduce confusion in your Bicep file, delete any imports that are defined but not used. This test finds all imports that aren't used anywhere in the template.
22+
23+
The following example fails this test because `myImports` and `myObjectType` are not used in the Bicep file:
24+
25+
```bicep
26+
import * as myImports from 'exports.bicep'
27+
import {myObjectType, sayHello} from 'exports.bicep'
28+
29+
output greeting string = sayHello('Bicep user')
30+
```
31+
32+
You can fix it by removing and updating the `import` statements.
33+
34+
```bicep
35+
import {sayHello} from 'exports.bicep'
36+
37+
output greeting string = sayHello('Bicep user')
38+
```
39+
40+
Use **Quick Fix** to remove the unused imports:
41+
42+
:::image type="content" source="./media/linter-rule-no-unused-imports/linter-rule-no-unused-imports-quick-fix.png" alt-text="A screenshot of using Quick Fix for the no-unused-variables linter rule.":::
43+
44+
## Next steps
45+
46+
For more information about the linter, see [Use Bicep linter](./linter.md).

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

Lines changed: 3 additions & 2 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: 02/12/2025
6+
ms.date: 06/06/2025
77
---
88

99
# Use Bicep linter
@@ -35,6 +35,7 @@ The default set of linter rules is minimal and taken from [arm-ttk test cases](.
3535
- [no-loc-expr-outside-params](./linter-rule-no-loc-expr-outside-params.md)
3636
- [no-unnecessary-dependson](./linter-rule-no-unnecessary-dependson.md)
3737
- [no-unused-existing-resources](./linter-rule-no-unused-existing-resources.md)
38+
- [no-unused-imports](./linter-rule-no-unused-imports.md)
3839
- [no-unused-params](./linter-rule-no-unused-parameters.md)
3940
- [no-unused-vars](./linter-rule-no-unused-variables.md)
4041
- [outputs-should-not-contain-secrets](./linter-rule-outputs-should-not-contain-secrets.md)
@@ -57,7 +58,7 @@ The default set of linter rules is minimal and taken from [arm-ttk test cases](.
5758
- [use-stable-vm-image](./linter-rule-use-stable-vm-image.md)
5859
- [what-if-short-circuiting](./linter-rule-what-if-short-circuiting.md)
5960

60-
You can customize how the linter rules are applied. To overwrite the default settings, add a **bicepconfig.json** file and apply custom settings. For more information about applying those settings, see [Add custom settings in the Bicep config file](bicep-config-linter.md).
61+
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).
6162

6263
## Use in Visual Studio Code
6364

Loading

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,9 @@ items:
509509
- name: No unused existing resources
510510
displayName: linter
511511
href: linter-rule-no-unused-existing-resources.md
512+
- name: No unused imports
513+
displayName: linter
514+
href: linter-rule-no-unused-imports.md
512515
- name: No unused parameters
513516
displayName: linter
514517
href: linter-rule-no-unused-parameters.md

articles/azure-vmware/install-cloud-backup-virtual-machines.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ ms.custom: engagement-fy23
1010

1111
# Install Cloud Backup for Virtual Machines (preview)
1212

13-
Cloud Backup for Virtual Machines is a plug-in installed in the Azure VMware Solution and enables you to back up and restore Azure NetApp Files datastores and virtual machines (VMs).
13+
Cloud Backup for Virtual Machines is a plug-in installed in the Azure VMware Solution and enables you to back up and restore Azure NetApp Files datastores and virtual machines (VMs) residing in NetApp Datastore to be backed up and restored.
14+
15+
:::image type="content" source="./media/cloud-backup/cloud-backup-overview.png" alt-text="Diagram showing solution overview of Cloud Backup for Virtual Machines." lightbox="./media/cloud-backup/cloud-backup-overview.png":::
16+
1417

1518
Cloud Backup for Virtual Machines features:
1619

@@ -96,7 +99,7 @@ You can execute the run command to uninstall Cloud Backup for Virtual Machines.
9699

97100
> [!IMPORTANT]
98101
> Before you initiate the upgrade, you must:
99-
> * Backup the MySQL database of Cloud Backup for Virtual Machines.
102+
> * Back up the MySQL database of Cloud Backup for Virtual Machines.
100103
> * Ensure that there are no other VMs installed in the VMware vSphere tag: `AVS_ANF_CLOUD_ADMIN_VM_TAG`. All VMs with this tag are deleted when you uninstall.
101104
102105
1. Select **Run command** > **Packages** > **NetApp.CBS.AVS** > **Uninstall-NetAppCBSAppliance**.
270 KB
Loading
Lines changed: 67 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,100 @@
11
---
2-
title: Auto-Enable Backup on VM Creation using Azure Policy
3-
description: 'An article describing how to use Azure Policy to auto-enable backup for all VMs created in a given scope'
2+
title: Audit and enforce backup during VM creation automatically using Azure Policy
3+
description: Learn how to use Azure Policy to autoenable backup for all VMs created in a given scope.
44
ms.topic: how-to
5-
ms.date: 06/29/2024
5+
ms.date: 06/09/2025
66
ms.service: azure-backup
77
author: jyothisuri
88
ms.author: jsuri
99
ms.custom: engagement-fy24
1010
---
1111

12-
# Auto-enable backup on VM creation using Azure Policy
12+
# Audit and enforce backup during virtual machine creation automatically using Azure Policy
1313

14-
One of the key responsibilities of a Backup or Compliance Admin in an organization is to ensure that all business-critical machines are backed up with the appropriate retention.
14+
This article describes how Backup or Compliance Admins can ensure that all business-critical machines have appropriate backup and retention policies.
1515

16-
Today, Azure Backup provides a variety of built-in policies (using [Azure Policy](../governance/policy/overview.md)) to help you automatically ensure that your Azure virtual machines are configured for backup. Depending on how your backup teams and resources are organized, you can use any one of the below policies:
16+
Azure Backup offers a variety of built-in policies through [Azure Policy](../governance/policy/overview.md) to help you automatically configure backup for your Azure Virtual Machines (VMs). Based on the structure of your backup teams and the organization of your resources, you can choose the most suitable policy from the following options to ensure effective and consistent backup management.
1717

18-
## Policy 1 - Configure backup on VMs without a given tag to an existing recovery services vault in the same location
18+
## Azure Policy types for Azure VM backup
1919

20-
If your organization has a central backup team that manages backups across application teams, you can use this policy to configure backup to an existing central Recovery Services vault in the same subscription and location as the VMs being governed. You can choose to **exclude** VMs which contain a certain tag, from the scope of this policy.
20+
The following table lists the various policy types that allows you to manage Azure VM instances backups automatically:
2121

22-
## Policy 2 - Configure backup on VMs with a given tag to an existing recovery services vault in the same location
23-
This policy works the same as Policy 1 above, with the only difference being that you can use this policy to **include** VMs which contain a certain tag, in the scope of this policy.
22+
| Policy type | Description |
23+
| --- | --- |
24+
| Policy 1 | Configures backup on VMs without a given tag to an existing Recovery Services vault in the same location. |
25+
| Policy 2 | Configures backup on VMs with a given tag to an existing Recovery Services vault in the same location. |
26+
| Policy 3 | Configures backup on VMs without a given tag to a new Recovery Services vault with a default policy. |
27+
| Policy 4 | Configures backup on VMs with a given tag to a new Recovery Services vault with a default policy. |
2428

25-
## Policy 3 - Configure backup on VMs without a given tag to a new recovery services vault with a default policy
26-
If you organize applications in dedicated resource groups and want to have them backed up by the same vault, this policy allows you to automatically manage this action. You can choose to **exclude** VMs which contain a certain tag, from the scope of this policy.
29+
### Policy 1: Configure backup on VMs without a given tag to an existing recovery services vault in the same location
2730

28-
## Policy 4 - Configure backup on VMs with a given tag to a new recovery services vault with a default policy
29-
This policy works the same as Policy 3 above, with the only difference being that you can use this policy to **include** VMs which contain a certain tag, in the scope of this policy.
31+
This policy enables a central backup team to configure backup for Azure Virtual Machines using an existing central Recovery Services vault located in the same subscription and region as the governed VMs. You can **exclude** specific VMs from the policy scope with a designated tag.
3032

31-
In addition to the above, Azure Backup also provides an [audit-only](../governance/policy/concepts/effects.md#audit) policy - **Azure Backup should be enabled for Virtual Machines**. This policy identifies which virtual machines do not have backup enabled, but doesn't automatically configure backups for these VMs. This is useful when you are only looking to evaluate the overall compliance of the VMs but not looking to take action immediately.
3233

33-
## Supported Scenarios
34+
### Policy 2: Configure backup on VMs with a given tag to an existing recovery services vault in the same location
35+
This policy functions same as Policy 1, with a key difference - the policy **includes** virtual machines in the policy scope if they have a specific tag.
3436

35-
* The built-in policy is currently supported only for Azure VMs. Users must take care to ensure that the retention policy specified during assignment is a VM retention policy. Refer to [this](./backup-azure-policy-supported-skus.md) document to see all the VM SKUs supported by this policy.
37+
### Policy 3: Configure backup on VMs without a given tag to a new recovery services vault with a default policy
3638

37-
* Policies 1 and 2 can be assigned to a single location and subscription at a time. To enable backup for VMs across locations and subscriptions, multiple instances of the policy assignment need to be created, one for each combination of location and subscription.
39+
This policy targets applications organized in dedicated resource groups and backs them up using the same Recovery Services vault. It automatically manages this configuration and allows you to **exclude** virtual machines from the policy scope that have a specific tag.
3840

39-
* For Policies 1 and 2, management group scope is currently unsupported.
41+
### Policy 4: Configure backup on VMs with a given tag to a new recovery services vault with a default policy
4042

41-
* For Policies 1 and 2, the specified vault and the VMs configured for backup can be under different resource groups.
43+
This policy functions same as Policy 3, with a key difference - the policy **includes** virtual machines in the policy scope if they have a specific tag.
4244

43-
* Policies 3 and 4 can be assigned to a single subscription at a time (or a resource group within a subscription).
45+
Azure Backup also provides an [audit-only](../governance/policy/concepts/effects.md#audit) policy - **Azure Backup should be enabled for Virtual Machines**. This policy identifies virtual machines without backup enabled but doesn't apply any backup configuration, which helps assess compliance without enforcing changes.
46+
47+
## Supported and unsupported Scenarios for Azure VMs backup with Azure Policy
48+
49+
The following table lists the supported and unsupported scenarios for the available policy types:
50+
51+
| Policy type | Supported | Unsupported |
52+
| --- | --- | --- |
53+
| **Built-in policy** | Currently supported only for Azure VMs. Ensure that the retention policy specified during assignment is a VM retention policy. <br><br> Learn about [the VM SKUs supported by this policy](./backup-azure-policy-supported-skus.md) . | |
54+
| **Policies 1 and 2** | - Can be assigned to a single location and subscription at a time. To enable backup for VMs across locations and subscriptions, you need to create multiple instances of the policy assignment, one for each combination of location and subscription. <br><br> - The specified vault and the VMs configured for backup can be under different resource groups. | Management group scope is currently unsupported. |
55+
| **Policies 3 and 4** | Can be assigned to a single subscription at a time (or a resource group within a subscription). | |
4456

4557
[!INCLUDE [backup-center.md](../../includes/backup-center.md)]
4658

47-
## Using the built-in policies
59+
## Assign built-in Azure Policy for Azure VM backup
60+
61+
This section outlines the end-to-end steps to assign [Policy 1](#policy-1-configure-backup-on-vms-without-a-given-tag-to-an-existing-recovery-services-vault-in-the-same-location). The same instructions apply to the other policies. After assignment, the policy automatically configures backup for any new VM created within the defined scope.
62+
63+
To assign Policy 1 for Azure VM backup, follow these steps:
64+
65+
1. In the [Azure portal](https://portal.azure.com/), go to **Policy**> **Authoring** > **Definitions** to view the list of all built-in policies across Azure Resources.
66+
67+
1. On the **Policy Definitions** pane, filter the list for **Category=Backup** and select the policy named *Configure backup on virtual machines without a given tag to an existing recovery services vault in the same location*.
68+
69+
:::image type="content" source="./media/backup-azure-auto-enable-backup/policy-dashboard-inline.png" alt-text="Screenshot showing how to filter the list by category on Policy dashboard." lightbox="./media/backup-azure-auto-enable-backup/policy-dashboard-expanded.png":::
70+
71+
1. On the selected policy pane, review the policy details, and then select **Assign**.
72+
73+
:::image type="content" source="./media/backup-azure-auto-enable-backup/policy-definition-blade.png" alt-text="Screenshot shows the Policy Definition pane." lightbox="./media/backup-azure-auto-enable-backup/policy-definition-blade.png":::
74+
75+
1. On the **Assign Policy** pane, on the **Basics** tab, select the **more icon** corresponding to **Scope**.
76+
77+
:::image type="content" source="./media/backup-azure-auto-enable-backup/policy-assignment-basics.png" alt-text="Screenshot shows the Policy Assignment Basics tab." lightbox="./media/backup-azure-auto-enable-backup/policy-assignment-basics.png":::
78+
79+
1. On the right context pane, select the subscription for the policy to be applied on.
80+
81+
You can also select a resource group, so that the policy is applied only for VMs in a particular resource group.
82+
83+
1. On the **Parameters** tab, select the **Location**, **Vault**, and **Backup Policy** to which the VMs in the scope must be associated.
84+
85+
You can also specify a tag name and an array of tag values. A VM which contains any of the specified values for the given tag are excluded from the scope of the policy assignment.
86+
87+
:::image type="content" source="./media/backup-azure-auto-enable-backup/policy-assignment-parameters.png" alt-text="Screenshot shows the Policy Assignment Parameters pane." lightbox="./media/backup-azure-auto-enable-backup/policy-assignment-parameters.png":::
4888

49-
The below steps describe the end-to-end process of assigning Policy 1: **Configure backup on VMs without a given tag to an existing recovery services vault in the same location** to a given scope. Similar instructions will apply for the other policies. Once assigned, any new VM created in the scope is automatically configured for backup.
89+
Ensure that **Effect** is set to **`deployIfNotExists`**.
5090

51-
1. Sign in to the Azure portal and navigate to the **Policy** Dashboard.
52-
2. Select **Definitions** in the left menu to get a list of all built-in policies across Azure Resources.
53-
3. Filter the list for **Category=Backup** and select the policy named *Configure backup on virtual machines without a given tag to an existing recovery services vault in the same location*.
54-
:::image type="content" source="./media/backup-azure-auto-enable-backup/policy-dashboard-inline.png" alt-text="Screenshot showing how to filter the list by category on Policy dashboard." lightbox="./media/backup-azure-auto-enable-backup/policy-dashboard-expanded.png":::
55-
4. Select the name of the policy. You'll be redirected to the detailed definition for this policy.
56-
![Screenshot showing the Policy Definition pane.](./media/backup-azure-auto-enable-backup/policy-definition-blade.png)
57-
5. Select the **Assign** button at the top of the pane. This redirects you to the **Assign Policy** pane.
58-
6. Under **Basics**, select the three dots next to the **Scope** field. This opens up a right context pane where you can select the subscription for the policy to be applied on. You can also optionally select a resource group, so that the policy is applied only for VMs in a particular resource group.
59-
![Screenshot showing the Policy Assignment Basics tab.](./media/backup-azure-auto-enable-backup/policy-assignment-basics.png)
60-
7. In the **Parameters** tab, choose a location from the drop-down, and select the vault and backup policy to which the VMs in the scope must be associated. You can also choose to specify a tag name and an array of tag values. A VM which contains any of the specified values for the given tag will be excluded from the scope of the policy assignment.
61-
![Screenshot showing the Policy Assignment Parameters pane.](./media/backup-azure-auto-enable-backup/policy-assignment-parameters.png)
62-
8. Ensure that **Effect** is set to deployIfNotExists.
63-
9. Navigate to **Review+create** and select **Create**.
91+
1. On the **Review+create** tab, select **Create**.
6492

6593
> [!NOTE]
6694
>
6795
> - Azure Policy can also be used on existing VMs, using [remediation](../governance/policy/how-to/remediate-resources.md).
68-
> - It's recommended that this policy not be assigned to more than 200 VMs at a time. If the policy is assigned to more than 200 VMs, it can result in the backup being triggered a few hours later than that specified by the schedule.
96+
> - Avoid assigning this policy to more than 200 VM at once, as it might delay backup triggers by several hours beyond the scheduled time.
6997
70-
## Next step
98+
## Related content
7199

72-
[Learn more about Azure Policy](../governance/policy/overview.md)
100+
[About Azure Policy](../governance/policy/overview.md).

0 commit comments

Comments
 (0)