Getting Started with KeyVault - Manage Key Vault - in Go

Última actualización: 14/11/2017
Editar en GitHub
  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.

Running this Sample

  1. If you don't already have it, install Go.

  2. Clone the repository.

    git clone https://github.com:Azure-Samples/key-vault-go-manage.git
    
  3. Install the dependencies using glide.

    cd key-vault-go-manage
    glide install
    
  4. Create an Azure service principal either through Azure CLI, PowerShell or the portal.

  5. 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 of export.

  6. Run the sample.

    go run example.go
    

More information

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.