Skip to content
Examples of how to utilize Azure services from Go.
Branch: master
Clone or download
esell and jhendrixMSFT Add Key Vault password manager sample (#199)
* add key vault password manager sample

* update package name for key vault pw manager

* cleanup flags to make more sense
Latest commit 9c6bed0 Apr 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github merge into CONTRIBUTING.md Jan 3, 2018
apps/tracing Add tracing sample (#241) Mar 26, 2019
authorization cleanup and fixes Jul 23, 2018
batch Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
cdn cleanup and fixes Jul 23, 2018
cognitiveservices Update to latest sdk and fix build (#233) Nov 19, 2018
compute Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
cosmosdb Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
eventhubs Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
graphrbac Create Active Directory Group Sample (#226) Nov 29, 2018
hdinsight Add sample for HDInsight (#214) Aug 14, 2018
insights Fix insights sample (#229) Nov 6, 2018
internal Add sample for HDInsight (#214) Aug 14, 2018
keyvault Add Key Vault password manager sample (#199) Apr 8, 2019
msi Add user-assigned identity sample. (#213) Aug 9, 2018
network Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
quickstarts/deploy-vm Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
resources
sql Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
storage Use the recommended method WaitForCompletionRef (#236) Nov 19, 2018
test split network samples into multiple files Oct 22, 2018
web Added a sample using the insights package (#222) Sep 11, 2018
.env.tpl update storage config Jul 23, 2018
.gitignore cleanup and fixes Jul 23, 2018
.travis.yml Update to latest sdk and fix build (#233) Nov 19, 2018
CONTRIBUTING.md Add auth helpers, and v15 support (#161) Apr 4, 2018
Gopkg.lock Update to latest sdk and fix build (#233) Nov 19, 2018
Gopkg.toml Update to latest sdk and fix build (#233) Nov 19, 2018
HYBRID_README.md Parametrize environment to use (#167) Apr 13, 2018
LICENSE.md add required meta docs Nov 7, 2017
Makefile update test scripts Jul 23, 2018
README.md replace config system Jul 23, 2018

README.md

Azure SDK for Go Samples

azure-sdk-for-go-samples is a collection of sample usages of the Azure/azure-sdk-for-go.

Build Status

For general SDK help, start with the main SDK README.

To run tests

  1. set up authentication (see following)
  2. dep ensure
  3. go test -v ./network/ (or any package)

To run all tests: make test.

To use service principal authentication, create a principal by running az ad sp create-for-rbac -n "<yourAppName>" and set the following environment variables. You can copy .env.tpl to a .env file in each package for ease of use.

export AZURE_SUBSCRIPTION_ID=
export AZURE_TENANT_ID=
export AZURE_CLIENT_ID=
export AZURE_CLIENT_SECRET=

export AZURE_LOCATION_DEFAULT=westus2
export AZURE_BASE_GROUP_NAME=azure-samples-go
export AZURE_KEEP_SAMPLE_RESOURCES=0

For device flow authentication, create a "native" app by running az ad app create --display-name "<yourAppName>" --native-app --requiredResourceAccess @manifest.json; and specify the -useDeviceFlow flag when running tests.

Other notes

AZURE_SP_OBJECT_ID represents a service principal ObjectID. It is needed to run the Create VM with encrypted managed disks sample.

Resources

License

This code is provided under the MIT license. See LICENSE for details.

Contribute

We welcome your contributions! For instructions and our code of conduct see CONTRIBUTING.md. And thank you!

You can’t perform that action at this time.