【发布时间】:2021-10-24 09:28:34
【问题描述】:
我正在使用 terraform 创建一个 Azure AD 应用程序,我已经尝试了 terraform 示例 https://registry.terraform.io/providers/hashicorp/azuread/latest/docs/resources/application 中的默认示例,我还从我手动创建的代码中自定义了下面的代码(基本上,我已经手动创建了一个应用程序AD 并使用 terraform 为创建的应用程序从数据资源中获取详细信息)。两个代码都抛出相同的错误
错误:值必须是有效的 UUID │ │ azuread_application.example,│在 adapp.tf 第 3 行,在资源中 "azuread_application" "example": │ 3: 资源 “azuread_application” “示例” {
这是我根据原始示例自定义的代码
data "azuread_client_config" "current" {}
resource "azuread_application" "example" {
display_name = "example"
identifier_uris = ["api://example-app"]
owners = [data.azuread_client_config.current.object_id]
sign_in_audience = "AzureADMultipleOrgs"
required_resource_access {
resource_app_id = "00000003-0000-0000-c000-000000000000"
resource_access {
id = "..."
type = "Scope"
}
}
web {
redirect_uris = ["https://app.example.net/account"]
implicit_grant {
access_token_issuance_enabled = false
}
}
}
我已经验证了“data.azuread_client_config.current.object_id”,它不为空并且它产生了值。
地形配置:
windows_amd64 上的 Terraform v0.15.4
- 提供者 registry.terraform.io/hashicorp/azuread v1.6.0
【问题讨论】:
标签: azure-devops azure-active-directory terraform terraform-provider-azure