https://github.com/bartvanbenthem/azure-sdk-example
azure sdk for go example, authenticates and lists all azure resource groups within a given subscription.
https://github.com/bartvanbenthem/azure-sdk-example
Last synced: 5 months ago
JSON representation
azure sdk for go example, authenticates and lists all azure resource groups within a given subscription.
- Host: GitHub
- URL: https://github.com/bartvanbenthem/azure-sdk-example
- Owner: bartvanbenthem
- Created: 2020-08-27T14:50:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-27T16:22:25.000Z (almost 6 years ago)
- Last Synced: 2024-04-24T04:53:00.112Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 7.98 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# azure sdk for go example
azure sdk for go example demonstrates the following concepts.
1. Using `auth.NewAuthorizerFromEnvironment()` for authorization.
2. list all resource groups within a given subscription
# How to Build
1. Execute `go get https://github.com/bartvanbenthem/azsdkexample`
2. Execute `dep ensure`
3. Execute `go build`
# How to Run
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
AZURE_SUBSCRIPTION_ID
```
More information about authorization can be found [here](https://github.com/azure/azure-sdk-for-go#more-authentication-details).