【发布时间】:2020-09-27 06:28:43
【问题描述】:
我正在尝试在 Azure AD 中建立一个组。
var group = Output.Create(
GetGroup.InvokeAsync(
new GetGroupArgs
{
Name = "Administrators"
}));
PS C:\dev\___> pulumi preview
Previewing update (dev):
Type Name Plan Info
pulumi:pulumi:Stack Frontend-dev 1 error
Diagnostics:
pulumi:pulumi:Stack (Frontend-dev):
error: Running program 'C:\dev\___\bin\Debug\netcoreapp3.1\Frontend.dll' failed with an unhandled exception:
Grpc.Core.RpcException: Status(StatusCode=Unknown, Detail="invocation of azuread:index/getGroup:getGroup returned an error: Error building AzureAD Client: Authenticating using the Azure CLI is only supported as a User (not a Service Principal).
To authenticate to Azure using a Service Principal, you can use the separate 'Authenticate using a Service Principal'
auth method - instructions for which can be found here:
Alternatively you can authenticate using the Azure CLI by using a User Account.")
at Pulumi.GrpcMonitor.InvokeAsync(InvokeRequest request)
at Pulumi.Deployment.InvokeAsync[T](String token, InvokeArgs args, InvokeOptions options, Boolean convertResult)
at Pulumi.Output`1.ApplyHelperAsync[U](Task`1 dataTask, Func`2 func)
at Pulumi.Output`1.Pulumi.IOutput.GetDataAsync()
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop)
at Pulumi.Deployment.SerializeFilteredPropertiesAsync(String label, IDictionary`2 args, Predicate`1 acceptKey)
at Pulumi.Deployment.SerializeAllPropertiesAsync(String label, IDictionary`2 args)
at Pulumi.Deployment.RegisterResourceOutputsAsync(Resource resource, Output`1 outputs)
at Pulumi.Deployment.Runner.WhileRunningAsync()
Pulumi.dev.yaml 包含服务主体凭据。
我按照create a service principal 和configure it with the appropriate permissions 的指示进行操作。
错误信息谈到了一些说明:
要使用服务主体对 Azure 进行身份验证,您可以使用单独的“使用服务主体进行身份验证” auth 方法 - 可在此处找到相关说明:
谁能帮我找到这些说明,以便我整理出我可能遗漏的内容?
【问题讨论】:
-
能否请您在github.com/pulumi/pulumi-azuread 中打开一个问题?
-
完成。 (弥补空间让SO快乐)
标签: azure-active-directory infrastructure-as-code pulumi