services | platforms | author |
---|---|---|
KeyVault |
Go |
mcardosos |
Azure Key Vault sample for managing key vaults -
- Create a key vault
- Authorize an application
- Update a key vault
- alter configurations
- change permissions
- Create another key vault
- List key vaults
- Delete a key vault.
-
If you don't already have it, install Go.
-
Clone the repository.
git clone https://github.com:Azure-Samples/key-vault-go-manage.git
-
Install the dependencies using glide.
cd key-vault-go-manage glide install
-
Create an Azure service principal either through Azure CLI, PowerShell or the portal.
-
Set the following environment variables using the information from the service principle that you created.
export AZURE_TENANT_ID={your tenant id} export AZURE_CLIENT_ID={your client id} export AZURE_CLIENT_SECRET={your client secret} export AZURE_SUBSCRIPTION_ID={your subscription id}
[AZURE.NOTE] On Windows, use
set
instead ofexport
. -
Run the sample.
go run example.go
Please refer to Azure SDK for Go for more information. If you don't have a Microsoft Azure subscription you can get a FREE trial account here
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.