henokv / azure-env

Home Page:https://azure-env.henokv.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

goreleaser

azure-env

Azure env is a CLI tool built to help solve a specific problem. Sometimes while testing certain CLI tools (e.g.: terraform import) locally I can't automatically use all credentials in the shell.

This tool allows you to use env vars and still use azure key vault to store the secrets. Later on support for azure app configuration might get added.

Installation

To install download the latest version from the releases page or if you have go installed run the command

go install github.com/henokv/azure-env@latest

Usage

Linux config file

Contents of .env

AZURE_CLIENT_SECRET=azure://knox.vault.azure.net/secret
PUBLIC_ENV_VAR=notasecret
# Run the command which will consume the secrets from the env file
azure-env run -f .env terraform plan

Linux env vars

# Set a secret supported by azure cli & terraform
export AZURE_CLIENT_SECRET=azure://knox.vault.azure.net/secret
# Run the command which will consume the secret
azure-env run terraform plan

Windows env vars

# Set a secret supported by azure cli & terraform
$Env:AZURE_CLIENT_SECRET=azure://knox.vault.azure.net/secret
# Run the command which will consume the secret
azure-env run terraform plan

About

https://azure-env.henokv.dev/

License:MIT License


Languages

Language:Go 100.0%