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

Create Azure CLI plugin #431

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Create Azure CLI plugin #431

wants to merge 1 commit into from

Conversation

oWretch
Copy link

@oWretch oWretch commented Feb 20, 2024

Overview

Create a new plugin for Azure CLI.

Sadly the az cli doesn't support environment variables for login, so this plugin runs az login and az logout to resolve this issue.

The plugin uses an Entra ID Service Principal for authentication which needs to be created and granted permissions to the Azure subscription(s).

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

None

How To Test

az group list

Changelog

Authenticate the Azure CLI using Touch ID and other unlock options with 1Password Shell Plugins.
The Azure plugin can be correctly initialized with a default credential, using op plugin az init.
The Azure plugin will check for the AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID environment variables and attempts to import credentials from them.

Copy link
Contributor

⚠️ This PR contains unsigned commits. To get your PR merged, please sign those commits (git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch (git push --force-with-lease).

If you're new to commit signing, there are different ways to set it up:

Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing
Sign commits with ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with 1Password

You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.

Learn how to use 1Password to sign your commits.

Watch the demo

@oWretch
Copy link
Author

oWretch commented Feb 20, 2024

The provisioner test is based on setting environment variables which is not actually usable by az cli. I'm not sure what the best way to approach this is...

@oWretch oWretch marked this pull request as draft February 23, 2024 02:56
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

Successfully merging this pull request may close these issues.

1 participant