juju add-credential azure -h shows incorrect example usage

Bug #1690920 reported by Jay R. Wren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Eric Claude Jones
2.2
Fix Released
Medium
Eric Claude Jones
2.3
Fix Released
Medium
Eric Claude Jones

Bug Description

$ juju add-credential azure -h
Usage: juju add-credential [options] <cloud name>

Summary:
Adds or replaces credentials for a cloud.

Options:
-f (= "")
    The YAML file containing credentials to add
--replace (= false)
    Overwrite existing credential information

Details:
The user is prompted to add credentials interactively if a YAML-formatted
credentials file is not specified. Here is a sample credentials file:

credentials:
  aws:
    <credential name>:
      auth-type: access-key
      access-key: <key>
      secret-key: <key>
  azure:
    <credential name>:
      auth-type: userpass
      application-id: <uuid1>
      application-password: <password>
      subscription-id: <uuid2>
      tenant-id: <uuid3>

A "credential name" is arbitrary and is used solely to represent a set of
credentials, of which there may be multiple per cloud.
The `--replace` option is required if credential information for the named
cloud already exists. All such information will be overwritten.
This command does not set default regions nor default credentials. Note
that if only one credential name exists, it will become the effective

When following this example, the auth-type: user-pass is invalid and juju complains:

ERROR credential "juju-azure-shell" contains invalid auth type "userpass", valid auth types for cloud "azure" are [interactive service-principal-secret]

I expect the example in -h output to use valid auth-type

  auth-type: service-principal-secret

instead of

  auth-type: userpass

Tags: helptext
Revision history for this message
Jay R. Wren (evarlast) wrote :

Related:

Once auth-type: service-principal-secret is used, the following credential is accepted:

credentials:
  azure:
    juju-azure-shell:
      auth-type: service-principal-secret
      application-id: c8432b3a-0e92-467f-bd9a-cf1e7f9f10ba
      application-password: REDACTED
      subscription-id: 84d9e50c-9349-4013-8cd6-c2fcd3ea4ae7
      tenant-id: 6451a011-aef1-463f-9cb2-719bee0ed72a

But fails on bootstrap with:

$ juju bootstrap azure/centralus
ERROR finalizing "juju-azure-shell" credential for cloud "azure": unknown key "tenant-id" (value "6451a011-aef1-463f-9cb2-719bee0ed72a")

The use of tenant-id in the example help output is wrong.

Changed in juju:
importance: Undecided → Low
Changed in juju:
status: New → Triaged
milestone: none → 2.2.0
milestone: 2.2.0 → 2.3-alpha1
importance: Low → Medium
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1690920] Re: juju add-credential azure -h shows incorrect example usage

Isn't this just a documentation bug? I don't see why it couldn't target 2.2.

On Mon, May 15, 2017 at 7:04 PM, Menno Finlay-Smits <
<email address hidden>> wrote:

> ** Changed in: juju
> Status: New => Triaged
>
> ** Changed in: juju
> Milestone: None => 2.2.0
>
> ** Changed in: juju
> Milestone: 2.2.0 => 2.3-alpha1
>
> ** Changed in: juju
> Importance: Low => Medium
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1690920
>
> Title:
> juju add-credential azure -h shows incorrect example usage
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1690920/+subscriptions
>

Changed in juju:
milestone: 2.3-beta1 → 2.3-beta2
Changed in juju:
assignee: nobody → Eric Claude Jones (ecjones)
Changed in juju:
milestone: 2.3-beta2 → none
Changed in juju:
status: Triaged → In Progress
status: In Progress → Triaged
tags: added: helptext
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Eric Claude Jones (ecjones) wrote :
Revision history for this message
Eric Claude Jones (ecjones) wrote :
Changed in juju:
status: In Progress → Fix Committed
John A Meinel (jameinel)
Changed in juju:
status: Fix Committed → Fix Released
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.