你可以在哪里找到用于 Terraform 环境变量的 Azure 服务主体凭据?

huangapple go评论64阅读模式
英文:

Where can I find Azure service principal credentials for Terraform environment variables?

问题

我已创建一个Azure DevOps中的变量组,我想用它来对Terraform进行Azure身份验证。

我之前曾使其工作,但凭据已过期。我在将Azure中找到的值与这四个值进行映射时遇到了麻烦。

我相当确信ARM_CLIENT_ID是“应用程序(客户端)ID”。
ARM_CLIENT_SECRET是来自客户端密钥的“值”。
ARM_TENANT_ID是“目录(租户)ID”。

ARM_SUBSCRIPTION_ID应映射到什么?我尝试将其映射到两个截图中显示的对象ID和密钥ID,但都不起作用。

什么映射到什么?

英文:

I have created a variable group ins Azure Devops that I want to use to authenticate Terraform with Azure
你可以在哪里找到用于 Terraform 环境变量的 Azure 服务主体凭据?

I had this working previously but the credentials have expired. I'm having trouble mapping the values I find in Azure with these four values.

你可以在哪里找到用于 Terraform 环境变量的 Azure 服务主体凭据?
你可以在哪里找到用于 Terraform 环境变量的 Azure 服务主体凭据?

I'm reasonably confident that ARM_CLIENT_ID is the "Application (client) ID
The ARM_CLIENT_SECRET is the "Value" from the client secret
ARM_TENANT_ID is the "Directory (tenant) ID"

What should the ARM_SUBSCRIPTION_ID map to? I've tried mapping it to the Object ID and the Secret ID shown in the two screenshots but neither worked.

What maps to what?

答案1

得分: 1

要获取ARM_SUBSCRIPTION_ID变量的值,请按照以下步骤操作:

前往 Azure 门户 -> 订阅 -> 选择您的订阅 -> 概述 -> 订阅 ID

您在获取ARM_CLIENT_IDARM_TENANT_ID等其他变量的方面是正确的:

您可以在此处找到ARM_CLIENT_SECRET变量的值:

英文:

To get the value of ARM_SUBSCRIPTION_ID variable, follow this:

Go to Azure Portal -> Subscriptions -> Select your subscription -> Overview -> Subscription ID

你可以在哪里找到用于 Terraform 环境变量的 Azure 服务主体凭据?

You are right in fetching values of other variables like ARM_CLIENT_ID and ARM_TENANT_ID :

你可以在哪里找到用于 Terraform 环境变量的 Azure 服务主体凭据?

You can find value of ARM_CLIENT_SECRET variable here:

你可以在哪里找到用于 Terraform 环境变量的 Azure 服务主体凭据?

huangapple
  • 本文由 发表于 2023年7月3日 19:13:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76604197.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定