services | platforms | author |
---|---|---|
mssql |
go |
joshgav |
This package demonstrates how to manage SQL databases and their data.
- How to run all samples
- Management
- CreateServer
- CreateDatabase
- CreateFirewallRules
- Data plane
- Open
- CreateTable
- Insert
- Query
- Get this repo and all dependencies.
export PROJECT=github.com/Azure-Samples/azure-sdk-for-go-samples/compute
go get -u $PROJECT
cd ${GOPATH}/src/${PROJECT}
dep ensure
- Create an Azure service principal with the [Azure CLI][] command
az ad sp create-for-rbac
. - Set the following environment variables based on output properties of this
command. You can fill in these variables in
.env.tpl
in this directory and rename that to.env
.
EnvVar | Value |
---|---|
AZURE_CLIENT_ID | service principal/application ID |
AZURE_CLIENT_SECRET | service principal/application secret |
AZURE_TENANT_ID | your tenant id |
AZURE_SUBSCRIPTION_ID | your subscription ID |
AZURE_BASE_GROUP_NAME | base resource group name |
AZURE_LOCATION_DEFAULT | location for all resources |
- Run the sample.
go test -v
Please refer to Azure SDK for Go for more information.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.