Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved login #33

Open
carolynvs opened this issue Jan 4, 2022 · 2 comments
Open

Improved login #33

carolynvs opened this issue Jan 4, 2022 · 2 comments

Comments

@carolynvs
Copy link
Member

Logging in is a pain right now. You have to specify it for each action, and pass in a bunch of flags and remember to suppress output:

- az: 
      description: "Logging into Azure..."  
      arguments:
        - login
      flags:
        service-principal: ""
        username: "'{{bundle.credentials.AZURE_CLIENT_ID}}'"
        password: "'{{bundle.credentials.AZURE_CLIENT_SECRET}}'"
        tenant: "'{{bundle.credentials.AZURE_TENANT_ID}}'"
      suppress-output: true

We could add a custom login command to the mixin to simplify the default login, which assumes the default environment variable names:

install:
- az:
     login:

In addition, we could have the mixin detect if we are logged in (a file gets stored in ~/.azure after login) before running a command and then automatically logging in if needed.

@Doommius
Copy link

It would be awesome if support was added for using azcli credentials like Packer , as you'd be able to use a service principle from azure pipelines and handle permissions that way.

@lbergnehr
Copy link

That should be possible now that you can mount the ~/.azure directory into the invocation image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants