gpt4 book ai didi

azure - 使用新的 Pulumi azuread 模块出现身份验证错误

转载 作者:行者123 更新时间:2023-12-03 02:49:11 27 4
gpt4 key购买 nike

我已经安装了最新的 Pulumi azuread 模块,但在尝试 pulumi 预览时出现此错误:

Previewing update (int):

Type Name Plan Info
pulumi:pulumi:Stack test-int
└─ azuread:index:Application test 1 error

Diagnostics:
azuread:index:Application (test):
error: Error obtaining Authorization Token from the Azure CLI: Error waiting for the Azure CLI: exit status 1

我的index.ts非常基本:

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
import * as azuread from "@pulumi/azuread";

const projectName = pulumi.getProject();
const stack = pulumi.getStack();
const config = new pulumi.Config(projectName);

const baseName = `${projectName}-${stack}`;

const testRg = new azure.core.ResourceGroup(baseName, {
name: baseName
});


const test = new azuread.Application("test", {
availableToOtherTenants: false,
homepage: "https://homepage",
identifierUris: ["https://uri"],
oauth2AllowImplicitFlow: true,
replyUrls: ["https://replyurl"],
type: "webapp/api",
});

使用旧模块 azure.ad 创建资源和 AD 应用程序运行良好。

我不知道我现在错过了什么......

编辑:

index.ts 老方法

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const projectName = pulumi.getProject();
const stack = pulumi.getStack();
const config = new pulumi.Config(projectName);

const baseName = `${projectName}-${stack}`;

const testRg = new azure.core.ResourceGroup(baseName, {
name: baseName
});

const test = new azure.ad.Application("test", {
homepage: "https://homepage",
availableToOtherTenants: false,
identifierUris: ["https://uri"],
oauth2AllowImplicitFlow: true,
replyUrls: ["https://replyurl"]
});

pulumi预览结果:

Previewing update (int):                                                                                                                                                                   

Type Name Plan Info
pulumi:pulumi:Stack test-int
+ └─ azure:ad:Application test create 1 warning

Diagnostics:
azure:ad:Application (test):
warning: urn:pulumi:int::test::azure:ad/application:Application::test verification warning: The Azure Active Directory resources have been split out into their own Provider.

Information on migrating to the new AzureAD Provider can be found here: https://terraform.io/docs/providers/azurerm/guides/migrating-to-azuread.html

As such the Azure Active Directory resources within the AzureRM Provider are now deprecated and will be removed in v2.0 of the AzureRM Provider.

Resources:
+ 1 to create
2 unchanged

编辑2:

我在 Windows 10 上运行此程序:

  • az cli = 2.0.68
  • pulumi cli = 0.17.22
  • @pulumi/azure = 0.19.2
  • @pulumi/azuread = 0.18.2
  • @pulumi/pulumi = 0.17.21

以下是我对 Azure Active Directory Graph 的主要权限: enter image description here

以及 Microsoft Graph 的权限: enter image description here

最佳答案

我遇到了这个问题,几个小时后我意识到 Fiddler 以某种方式干扰了 Az CLI 的运行

关于azure - 使用新的 Pulumi azuread 模块出现身份验证错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57008724/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com