Skip to content

Commit 8e844e2

Browse files
committed
MicrosoftDocs/azure-docs#55363 - Adds provider to resource string
1 parent 80592cc commit 8e844e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/governance/policy/concepts/policy-for-kubernetes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ cluster service principal.
243243
- Azure CLI
244244
245245
```azurecli-interactive
246-
az ad sp create-for-rbac --role "Policy Insights Data Writer (Preview)" --scopes "/subscriptions/<subscriptionId>/resourceGroups/<rg>/Microsoft.Kubernetes/connectedClusters/<clusterName>"
246+
az ad sp create-for-rbac --role "Policy Insights Data Writer (Preview)" --scopes "/subscriptions/<subscriptionId>/resourceGroups/<rg>/providers/Microsoft.Kubernetes/connectedClusters/<clusterName>"
247247
```
248248
249249
- Azure PowerShell
250250
251251
```azure powershell-interactive
252-
$sp = New-AzADServicePrincipal -Role "Policy Insights Data Writer (Preview)" -Scope "/subscriptions/<subscriptionId>/resourceGroups/<rg>/Microsoft.Kubernetes/connectedClusters/<clusterName>"
252+
$sp = New-AzADServicePrincipal -Role "Policy Insights Data Writer (Preview)" -Scope "/subscriptions/<subscriptionId>/resourceGroups/<rg>/providers/Microsoft.Kubernetes/connectedClusters/<clusterName>"
253253
254254
@{ appId=$sp.ApplicationId;password=[System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($sp.Secret));tenant=(Get-AzContext).Tenant.Id } | ConvertTo-Json
255255
```
@@ -277,7 +277,7 @@ enabled Kubernetes cluster:
277277

278278
```bash
279279
# In below command, replace the following values with those gathered above.
280-
# <AzureArcClusterResourceId> with your Azure Arc enabled Kubernetes cluster resource Id. For example: /subscriptions/<subscriptionId>/resourceGroups/<rg>/Microsoft.Kubernetes/connectedClusters/<clusterName>
280+
# <AzureArcClusterResourceId> with your Azure Arc enabled Kubernetes cluster resource Id. For example: /subscriptions/<subscriptionId>/resourceGroups/<rg>/providers/Microsoft.Kubernetes/connectedClusters/<clusterName>
281281
# <ServicePrincipalAppId> with app Id of the service principal created during prerequisites.
282282
# <ServicePrincipalPassword> with password of the service principal created during prerequisites.
283283
# <ServicePrincipalTenantId> with tenant of the service principal created during prerequisites.

0 commit comments

Comments
 (0)