Skip to content

Commit 8aea693

Browse files
authored
Support migrating a RBAC-enabled non-AAD cluster to a AKS-managed AAD cluster (Azure#14420)
1 parent f8f3a8a commit 8aea693

File tree

4 files changed

+580
-138
lines changed

4 files changed

+580
-138
lines changed

src/azure-cli/azure/cli/command_modules/acs/_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@
468468
text: az aks update -g MyResourceGroup -n MyManagedCluster --api-server-authorized-ip-ranges 0.0.0.0/32
469469
- name: Update a AKS-managed AAD cluster with tenant ID or admin group object IDs.
470470
text: az aks update -g MyResourceGroup -n MyManagedCluster --aad-admin-group-object-ids <id-1,id-2> --aad-tenant-id <id>
471-
- name: Update an existing AKS AAD-Integrated cluster to the new AKS-managed AAD experience.
472-
text: az aks update -g MyResourceGroup -n MyManagedCluster --enable-aad
471+
- name: Migrate a AKS AAD-Integrated cluster or a non-AAD cluster to a AKS-managed AAD cluster.
472+
text: az aks update -g MyResourceGroup -n MyManagedCluster --enable-aad --aad-admin-group-object-ids <id-1,id-2> --aad-tenant-id <id>
473473
"""
474474

475475
helps['aks delete'] = """

src/azure-cli/azure/cli/command_modules/acs/custom.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,9 +2257,7 @@ def aks_update(cmd, client, resource_group_name, name,
22572257
_populate_api_server_access_profile(api_server_authorized_ip_ranges, instance=instance)
22582258

22592259
if enable_aad:
2260-
if instance.aad_profile is None:
2261-
raise CLIError('Cannot specify "--enable-aad" for a non-AAD cluster')
2262-
if instance.aad_profile.managed:
2260+
if instance.aad_profile is not None and instance.aad_profile.managed:
22632261
raise CLIError('Cannot specify "--enable-aad" if managed AAD is already enabled')
22642262
instance.aad_profile = ManagedClusterAADProfile(
22652263
managed=True

0 commit comments

Comments
 (0)