add-credential interactive mode for Azure states subscription id is optional

Bug #1829909 reported by Peter Matulis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

When adding a credential for cloud type 'azure' in interactive mode the 'subscription-id' is marked as optional. The command does succeed without an id but if there are more than one (as in my case) then Juju may choose the wrong one (as it did for me). Perhaps we can have the optional aspect included only if Juju detects a single id.

Revision history for this message
Tim McNamara (tim-clicks) wrote :

Thanks for reporting this Peter. Were you able to work around this? I assume deleting the credential that you just created, then creating another with the correct subscription id would be a way around this.

Changed in juju:
status: New → Confirmed
importance: Undecided → Medium
tags: added: azure- credentials
tags: added: azure-provider cli ui ux
removed: azure-
tags: added: bitesize
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Peter,

Good pickup!
Generally, if a user has more than one id, they'd be very pedantic when adding a credential about which one they want.

However, I agree that we should avoid trying to guess and improve the UX as you describe.

Changed in juju:
status: Confirmed → Triaged
importance: Medium → Low
Revision history for this message
Tim McNamara (tim-clicks) wrote :

Perhaps we could get better at documenting some nuances here..

When a subscription ID is not provided, Juju relies on the default subscription provided by the Azure CLI. (You can check your current default via `az account show`). If Juju chooses the "wrong" subscription, that's because the az command is pointing to the wrong sub.

Note that by running `juju autoload-credentials`, Juju will associate each cloud with the "right" subscription. That's because it uses `az account list` and `az cloud list` to link them.

Revision history for this message
Tim McNamara (tim-clicks) wrote :

A change that makes subscription ID compulsory when are multiple accounts is currently under review:

https://github.com/juju/juju/pull/10432

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.