Demo for https://channel9.msdn.com/Shows/Azure-Friday/Go-on-Azure-Part-5-Build-apps-with-the-Azure-SDK-for-Go
This demo app uses the Azure SDK for Go to create a container group. It demonstrates the following concepts.
- Using
auth.NewAuthorizerFromEnvironment()
for authorization. - Blocking on an asynchronous operation until it completes.
- Optionally polling on the asynchronous operation while performing other work.
- How to traverse paged results, either by page or via a page iterator.
- Execute
go get github.com/jhendrixMSFT/c9demo1
- Execute
dep ensure
- Execute
go build
Set the appropriate environment variables depending on the type of authentication you wish to use. For authorization with a service principal set the following environment variables.
AZURE_CLIENT_ID
AZURE_CLIENT_SECRET
AZURE_TENANT_ID
More information about authorization can be found here.
This code is provided under the MIT license. See LICENSE for details.