Skip to content

Commit

Permalink
ARO-12200 include expected values for MIWI arguments in az aro create…
Browse files Browse the repository at this point in the history
… usage (#4050)

* include expected values for MIWI arguments in az aro create usage

This updates the usage for `az aro create` to show the expected values
for the `--assign-platform-workload-identity`/`--assign-platform-wi` and
`--mi-user-assigned`/`--assign-cluster-identity` arguments. This
should make it easier for users to provide the expected input

* Update python/az/aro/azext_aro/_params.py

Co-authored-by: Taylor Fahlman <[email protected]>

* clarify workload identity usage for cluster creation

* add detail for workload identity parameters in usage for upgrade

---------

Co-authored-by: Taylor Fahlman <[email protected]>
  • Loading branch information
2 people authored and ehvs committed Jan 23, 2025
1 parent 28538c1 commit 6e59050
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/az/aro/azext_aro/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,13 @@ def load_arguments(self, _):
options_list=['--enable-managed-identity', '--enable-mi'],
validator=validate_enable_managed_identity)
c.argument('platform_workload_identities', arg_group='Identity', is_preview=True,
help='Assign a platform workload identity used within the cluster',
help='Assign a platform workload identity used within the cluster. Requires two values: \
an operator name and either the name or resource ID of the Azure identity to use for it.',
options_list=['--assign-platform-workload-identity', '--assign-platform-wi'],
validator=validate_platform_workload_identities(isCreate=True),
action=AROPlatformWorkloadIdentityAddAction, nargs='+')
c.argument('mi_user_assigned', arg_group='Identity', is_preview=True,
help='Set the user managed identity on the cluster.',
help='Set the user managed identity on the cluster. Value must be an identity name or resource ID.',
options_list=['--mi-user-assigned', '--assign-cluster-identity'],
validator=validate_cluster_identity)

Expand All @@ -159,8 +160,9 @@ def load_arguments(self, _):
help='Refresh cluster application credentials.',
options_list=['--refresh-credentials'],
validator=validate_refresh_cluster_credentials)
c.argument('platform_workload_identities', arg_group='Identity',
help='Assign a platform workload identity used within the cluster', is_preview=True,
c.argument('platform_workload_identities', arg_group='Identity', is_preview=True,
help='Assign a platform workload identity used within the cluster. Requires two values: \
an operator name and either the name or resource ID of the Azure identity to use for it.',
options_list=['--assign-platform-workload-identity', '--assign-platform-wi'],
validator=validate_platform_workload_identities(isCreate=False),
action=AROPlatformWorkloadIdentityAddAction, nargs='+')
Expand Down

0 comments on commit 6e59050

Please sign in to comment.