Skip to content

Commit 8f79e73

Browse files
Merge pull request #280847 from tomvcassidy/sfBlockingOperationsGuidance
operation restrictions in managed and classic clusters
2 parents 793695d + e585604 commit 8f79e73

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

articles/service-fabric/managed-cluster-deny-assignment.md

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,67 @@ ms.author: tomcassidy
66
author: tomvcassidy
77
ms.service: service-fabric
88
services: service-fabric
9-
ms.date: 08/18/2023
9+
ms.date: 07/17/2024
1010
---
1111

1212
# Deny assignment policy for Service Fabric managed clusters
1313

14-
Deny assignment policies for Service Fabric managed clusters enable customers to protect the resources of their clusters. Deny assignments attach a set of deny actions to a user, group, or service principal at a particular scope to deny access. Limiting access to certain actions can help users from inadvertently damaging their clusters when they delete, deallocate restart, or reimage their clusters' scale set directly in the infrastructure resource group, which can cause the resources of the cluster to be unsynchronized with the data in the managed cluster.
14+
Deny assignment policies for Service Fabric managed clusters enable customers to protect their clusters' resources. Limiting access to certain actions can help users prevent inadvertent damage to their clusters when they delete, deallocate, restart, or reimage their clusters' scale sets. These actions, when done directly in the infrastructure resource group, can cause the resources of the cluster to desynchronize with the data in the cluster.
1515

16-
All actions that are related to managed clusters should be done through the managed cluster resource APIs instead of directly against the infrastructure resource group. Using the resource APIs ensures the resources of the cluster are synchronized with the data in the managed cluster.
16+
Deny assignments deny access by attaching a set of deny actions to a user, group, or service principal at a particular scope. You can learn more about deny assignments in the [Azure role-based access control (RBAC) documentation](../role-based-access-control/deny-assignments.md).
1717

18-
This feature ensures that the correct, supported APIs are used when performing delete operations to avoid any errors.
18+
This article pertains to Service Fabric managed clusters, but we make callouts when the information pertains to classic clusters as well.
1919

20-
You can learn more about deny assignments in the [Azure role-based access control (RBAC) documentation](../role-based-access-control/deny-assignments.md).
20+
## Proper actions
21+
22+
All actions related to managed clusters should be done through the managed cluster resource APIs instead of directly against the infrastructure resource group. Using the resource APIs ensures the resources of the cluster are synchronized with the data in the managed cluster.
23+
24+
See the [Best practices section](#best-practices) for guidance on what tools to use to go through the proper resource APIs.
25+
26+
## Blocked actions
27+
28+
The following actions are blocked when using managed clusters and don't apply to classic clusters.
29+
30+
* **VMSS deletes**
31+
* "Microsoft.Compute/virtualMachineScaleSets/delete"
32+
* **VMSS reimages, restarts, deallocates**
33+
* "Microsoft.Compute/virtualMachineScaleSets/reimage/action"
34+
* "Microsoft.Compute/virtualMachineScaleSets/restart/action"
35+
* "Microsoft.Compute/virtualMachineScaleSets/deallocate/action"
36+
* **VM deletes**
37+
* "Microsoft.Compute/virtualMachineScaleSets/delete/action"
38+
* **Storage account writes and deletes**
39+
* "Microsoft.Storage/storageAccounts/delete"
40+
* "Microsoft.Storage/storageAccounts/write"
41+
* **Resource group delete**
42+
* "Microsoft.Resources/subscriptions/resourceGroups/delete"
43+
* **Load balancer writes**
44+
* "Microsoft.Network/loadBalancers/write"
2145

2246
## Best practices
2347

2448
The following are some best practices to minimize the threat of desyncing your cluster's resources:
49+
2550
* Instead of deleting virtual machine scale sets directly from the managed resource group, use NodeType level APIs to delete the NodeType or virtual machine scale set. Options include the Node blade on the Azure portal and [Azure PowerShell](/powershell/module/az.servicefabric/remove-azservicefabricmanagednodetype).
2651
* Use the correct APIs to restart or reimage your scale sets:
2752
* [Virtual machine scale set restarts](/powershell/module/az.servicefabric/restart-azservicefabricmanagednodetype)
2853
* [Virtual machine scale set reimage](/powershell/module/az.servicefabric/set-azservicefabricmanagednodetype)
2954

55+
When managing resources in managed clusters, use ARM or ARM-backed tools to ensure the use of the proper resource APIs.
56+
57+
| Utility | ARM or ARM-backed |
58+
| - | - |
59+
| [ARM and ARM templates](/azure/templates/microsoft.servicefabric/clusters?pivots=deployment-language-arm-template) | Yes |
60+
| [Bicep](/azure/templates/microsoft.servicefabric/clusters?pivots=deployment-language-bicep) | Yes |
61+
| [Azure portal](https://portal.azure.com) | Yes |
62+
| [Azure CLI](/cli/azure/sf?view=azure-cli-latest&preserve-view=true) | Yes |
63+
| [Azure PowerShell](/powershell/module/az.servicefabric/?view=azps-12.1.0&preserve-view=true) | Yes |
64+
| [Service Fabric PowerShell](/powershell/module/servicefabric/?view=azureservicefabricps&preserve-view=true) | **No** |
65+
| [sfctl](service-fabric-sfctl.md) | **No** |
66+
67+
> [!IMPORTANT]
68+
> When managing resources in a **classic cluster** that were *created* by ARM or ARM-backed tools, continue to use those tools. There's risk of error when modifying the configuration of resources created in ARM with a non-ARM tool (for example, using Service Fabric PowerShell to update or delete a resource created in ARM).
69+
3070
## Next steps
3171

3272
* Learn more about [granting permission to access resources on managed clusters](how-to-managed-cluster-grant-access-other-resources.md)

0 commit comments

Comments
 (0)