Prisma Cloud: Azure オンボーディング Terraform「エラー: Azure CLIから認証トークンを取得中にエラーが発生しました」
4840
Created On 09/15/22 13:17 PM - Last Modified 07/29/25 14:55 PM
Objective
"Error: Error obtaining Authorization Token from the Azure CLI: Error parsing json result from the Azure CLI: Error waiting for the Azure CLI: exit status 1: ERROR: Tenant shouldn't be specified for Cloud Shell account"
with provider["registry.terraform.io/hashicorp/azuread"],
? on terraform (1).tf line 91, in provider "azuread":
? 91: provider "azuread" {
When running the terraform commands in your Azure Cloud shell during the onboarding process.Environment
- プリズマクラウド
- Azure オンボーディング
Procedure
これは Microsoft 側の問題のようです。ユーザーがTerraform を実行すると、 CLI (コマンド ライン インターフェイス) がトークン情報を解析せず、エラーが発生します。
この問題を解決する手順:
- AzureでCLI (Cloud Shell)を開き、次のコマンドを実行してAzureにログイン。
$ az login
- リンク? https://microsoft.com/devicelogin ? と認証コードが表示されます。
- ブラウザを使用してリンクを開き、認証コードを入力してください
- オンボーディング用のTerraformコマンドを実行できるようになりました
$ terraform init $ terraform apply
Additional Information
Terraform 経由で Azure アカウントをオンボードするには、 こちらのドキュメントをご覧ください。