我想使用terraform在蔚蓝云中创建一个资源组,为此我必须配置azurerm提供程序。
我使用cli创建了SPN。
# az ad sp create-for-rbac --name spn_devops_terraform --role="Contributor" --scopes="/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX"
The output includes credentials that you must protect. Be sure that you do not include
我想用terraform创建服务主体,并为此编写了terraform脚本。我有一个Azure DevOps管道,我在其中运行这个管道。我用来运行terraform脚本的服务主体在订阅时具有所有者访问权限。我在创建azure广告应用程序时遇到以下错误 │
│ with module.appregister.azuread_application.auth,
│ on modules/appregister/main.tf line 6, in resource "azuread_application" "auth":
│ 6: resource
我正在尝试用Terraform创建一个aks集群。。验证进行得很好。但是计划会出现以下错误。
有一些经验的Terraform以及天蓝色和阿克,但不是与azure广告。所以启发一下出了什么问题。
对和也进行了调查,但没有线索。
Error: building account: getting authenticated object ID: parsing json result from the Azure CLI: waiting for the Azure CLI: exit status 1: ERROR: AADSTS50076: Due to
a configuration cha
问题陈述
目前,我正在创建/修改不同订阅中的azure资源,并借助azure terraform。
误差
Principal <appid> does not exist in the directory {destination-tenant-id-for which contribution role required}
考虑以下场景.
我们希望在一个订阅中创建Azure AKS集群,在相同的执行中,我们希望在另一个订阅中更新DNS定义。如果我们在相同的订阅中同时拥有DNS区域和aks集群,则此过程运行良好,但如果这两个资源位于不同的订阅中,则无法工作。
采取的步骤
创建不需要
我对Terraform很陌生,我正在尝试使用Visual代码中找到的文档中的示例部署一个资源组。在尝试使用terraform apply或terraform plan时,我会收到一个json解析错误。命令terraform init、terraform fmt和terraform validate都可以正常工作。使用az login连接到天蓝色也是有效的。
有关代码、版本控制和设置的信息如下所示。
误差
╷
│ Error: building AzureRM Client: please ensure you have installed Azure CLI version 2.0.79 or
我使用服务主体作为azure的登录项。此服务主体的角色是“所有者”。
我试着跑:
az ad app list
和
az ad app create --display-name "Test application 2"
并得到错误:
当前用户注册应用程序需要目录权限。有关如何配置,请参考“”。原始错误:权限不足,无法完成操作。
我应该分配给这个服务主体什么角色?
我正在尝试使用1.21.0版的terraform azurerm提供者将AADLoginForWindows VM扩展添加到Azure Windows Server VM中。
安装失败,并显示以下消息:
Failure sending request: StatusCode=404 -- Original Error: Code="ArtifactNotFound" Message="Extension with publisher 'Microsoft.Azure.ActiveDirectory', type 'AADLoginForWindo
我使用terraform将Azure PostgresSQL灵活服务器部署为PAAS,运行良好。现在,我希望创建不同的角色,并使用terraform为数据库分配不同的特权。但这就提高了下面提到的误差。请看一看,并建议我适当的地形配置和所需的供应商为解决方案。
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/postgresql: provider registry registry.terraf
我正在尝试允许Azure中的服务主体从Azure Active Directory读取,以便在使用Terraform时对AAD执行查找。 我非常确定所需的角色是Security Reader角色,但是,我不确定需要什么上下文才能将服务主体添加到角色中。我假设它在tenantId上,但是不确定az role assignment命令需要什么格式? 我目前使用的代码如下: sp=$(az ad sp list --query "[?displayName=='[my app]'].appId" --output tsv)
tenantId=$(az account
第一次建立地形云并得到这个错误。不知道为什么在我的本地机器上安装了蔚蓝CLI并设置了路径,但我认为这与在terraform云平台中设置它有关。
Error: building AzureRM Client: please ensure you have installed Azure CLI version 2.0.79 or newer. Error parsing json result from the Azure CLI: launching Azure CLI: exec: "az": executable file not found in $PATH.
with
我试着用terraform apply来应用地形图。但是,当我运行该命令时,会得到以下错误
Error: Error building AzureRM Client: Error populating Client ID from the Azure CLI:
No Authorization Tokens were found -
please ensure the Azure CLI is installed and then log-in with `az login`.
我确实安装了Azure,并使用az login登录。当我运行az login时,我被重定向到登陆页面,在那里我可
我正在尝试创建一个管道,我将在其中对来自Azure DevOps管道的Azure订阅运行terraform配置。一切正常,但当我尝试以用户身份使用az cli登录时,失败了,错误为:
ERROR: Authentication failed due to error of 'Unsupported wstrust endpoint version. Current support version is wstrust2005 or wstrust13.' This typically happens when attempting a Microsoft account, wh
我尝试在Terraform项目中使用Azure/Azapi提供程序,但是在添加提供程序并运行terraform init之后,我得到以下错误:
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/azapi: provider registry registry.terraform.io does not have a provider named registry.terraform.io/hash
我所读到的所有内容都表明,我应该使用TF_VAR_方法将我的客户端秘密传递给Terraform,但是我一直收到这样的错误:
Error: No value for required variable
on variables.tf line 1:
1: variable "clientid" {
The root module input variable "clientid" is not set, and has no default
value. Use a -var or -var-file command line argument to
当试图通过terraform在AWS中创建elb(经典负载均衡器)时,我发送了一个从另一个模块创建的公共子网in列表。在这个例子中,我有4个子网,跨越3个z的子网。当我试图运行terraform时,我有来自az-1a的两个子网,我得到了一个错误:same az can't be used twice for ELB。
resource "aws_elb" "loadbalancer" {
name = "loadbalancer-terraform"
subnets = var.
我是新来的,需要帮忙。我有一些基本的配置来构建一个VPC和两个带有实例的子网。当我做了一个‘地形应用’时,它成功地运行了。现在运行一个terraform破坏并得到标题中的错误。即使是运行terraform计划,看看是否有任何变化,只是抛出同样的错误。完整的错误是
each.value is object with no attributes
This object does not have an attribute named "az".
我猜有一些与'for_each‘函数有关的东西,我做得不对。但我不知道它是如何成功应用的。我已经检查过了,从应用程序