我正在使用 Terraformazurerm_template_deployment部署 AADDS,运行时出现以下错误terraform apply
Error: Error validating Template for Deployment "aadds-arm-template" (Resource Group "RG-VNET-Aadds-001"): Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'Array'. Actual 'String'. Please see https://aka.ms/resource-manager-parameter-files for usage details.'.
-----------------------------------
我使用下面的构造在我的 terraform 代码中传递 theparams.parameters.json 和 aadds-arm-template.json 文件:
resource "azurerm_template_deployment" "aadds-arm-template" {
name = "aadds-arm-template"
resource_group_name = local.RG-Aadds-Name
template_body = file("aadds-arm-template.json")
parameters_body = file("theparams.parameters.json")
deployment_mode = "Incremental"
}
我相信 Terraform 对这个对象构造有问题:
"notificationSettings": {
"value": {
"notifyGlobalAdmins": "Disabled",
"notifyDcAdmins": "Enabled",
"additionalRecipients": []
}
},
在我的theparams.parameters.json文件中,我没有发布这两个文件的内容,因为我确信这是引起所有大惊小怪的对象的传递。如果有人会提供帮助将不胜感激。我还在此链接中使用了相同的构造:Terraform - 将类型对象作为参数传递给 Azure 模板部署,但它从未奏效。
我不知道该怎么做,请帮助没有意义我在过去的 2 天里一直在努力解决这个问题。