卡在认证这一步了, 想来操作 vm
1
Itoktsnhc 2020-12-29 10:42:58 +08:00
go 的没用过,.net 的需要在 azure 上新建一个 AD 应用 然后通过这个应用的名称 /租户名称 /密码这些东西来权限认证,看了下 go 的 sample 也很像:
|
2
Itoktsnhc 2020-12-29 10:43:46 +08:00
https://github.com/Azure-Samples/azure-sdk-for-go-samples:
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 |
3
Itoktsnhc 2020-12-29 10:45:19 +08:00
|