- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 terraform azurerm 提供程序版本 1.21.0 将 AADLoginForWindows VM 扩展添加到 Azure Windows Server VM。
安装失败并显示消息:
Failure sending request: StatusCode=404 -- Original Error: Code="ArtifactNotFound" Message="Extension with publisher 'Microsoft.Azure.ActiveDirectory', type 'AADLoginForWindows', and type handler version '1.0' could not be found in the extension repository.
应用 AADLoginForLinux 的 Terraform 配置(有效):
resource "azurerm_virtual_machine_extension" "AADLoginForLinux" {
name = "AADLoginForLinux"
location = "${azurerm_virtual_machine.vm-linux-bastion.location}"
resource_group_name = "${azurerm_virtual_machine.vm-linux-bastion.resource_group_name}"
virtual_machine_name = "${azurerm_virtual_machine.vm-linux-bastion.name}"
publisher = "Microsoft.Azure.ActiveDirectory.LinuxSSH"
type = "AADLoginForLinux"
type_handler_version = "1.0"
auto_upgrade_minor_version = true
}
我怀疑 type 或 type_handler_version 参数值有问题,但我不明白这些值与什么相关(并且一些谷歌搜索没有提供启发)。
没有适用于 AADLoginForWindows 的文档(也许这应该是一个警告!;)),但我希望它的工作方式与 AADLoginForLinux 大致相同,这允许我们使用直接管理的凭据登录 Linux VM Azure AD。
我的 Terraform 配置是:
resource "azurerm_virtual_machine_extension" "AADLoginForWindows" {
name = "AADLoginForWindows"
location = "${azurerm_resource_group.rg-dataaq-prd-neu-ftps.location}"
resource_group_name = "${azurerm_resource_group.rg-dataaq-prd-neu-ftps.name}"
virtual_machine_name = "${azurerm_virtual_machine.vm-windows.name}"
publisher = "Microsoft.Azure.ActiveDirectory"
type = "AADLoginForWindows"
type_handler_version = "1.0"
auto_upgrade_minor_version = true
depends_on = ["azurerm_virtual_machine_extension.antimal"]
}
使用 az cli
我可以找到有关扩展版本的以下信息:
az vm extension image list --name AADLoginForWindows
[
{
"name": "AADLoginForWindows",
"publisher": "Microsoft.Azure.ActiveDirectory",
"version": "0.3.0.0"
},
{
"name": "AADLoginForWindows",
"publisher": "Microsoft.Azure.ActiveDirectory",
"version": "0.3.1.0"
}
]
查询扩展程序的特定版本:
az vm extension image show --name AADLoginForWindows --publisher "Microsoft.Azure.ActiveDirectory" --location northeurope --version "0.3.1.0"
{
"computeRole": "IaaS",
"handlerSchema": null,
"id": "/Subscriptions/.../Providers/Microsoft.Compute/Locations/northeurope/Publishers/Microsoft.Azure.ActiveDirectory/ArtifactTypes/VMExtension/Types/AADLoginForWindows/Versions/0.3.1.0",
"location": "northeurope",
"name": "0.3.1.0",
"operatingSystem": "Windows",
"supportsMultipleExtensions": false,
"tags": null,
"type": null,
"vmScaleSetEnabled": false
}
我认为“publisher”Terraform 参数必须等于第一个查询中的发布者值。
事实上 type 在第二个查询中返回为 null,这让我想知道这是否真的映射到“type”Terraform 参数。
似乎没有任何与 type_handler_version 相关的内容。
有谁知道我应该使用什么配置来安装此虚拟机扩展?
任何人都可以更详细地描述 Terraform 类型和 type_handler_version 参数(并描述如何查找有效值)吗?
为了测试这是否是 Terraform 错误,我尝试使用 az cli
工具应用扩展:
az vm extension set -n AADLoginForWindows --publisher "Microsoft.Azure.ActiveDirectory" --vm vmname --resource-group rg-name
这会产生以下错误:
Handler 'Microsoft.Azure.ActiveDirectory.AADLoginForWindows' has reported failure for VM Extension 'AADLoginForWindows' with terminal error code '1007' and error message: 'Install failed for plugin (name: Microsoft.Azure.ActiveDirectory.AADLoginForWindows, version 0.3.1.0) with exception Command C:\Packages\Plugins\Microsoft.Azure.ActiveDirectory.AADLoginForWindows\0.3.1.0\AADLoginForWindowsHandler.exe of Microsoft.Azure.ActiveDirectory.AADLoginForWindows has exited with Exit code: 51'
最佳答案
更改您的 type_handler_version 以匹配实际版本(根据您的发现为 0.3.1.0)
type_handler_version = "0.3.1.0"
不能降版本,只能升级,而且只能小版本。
关于azure - AADLoginForWindows 的 Terraform Azure VM 扩展类型和 type_handler_version 参数值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54783072/
我正在尝试使用 terraform azurerm 提供程序版本 1.21.0 将 AADLoginForWindows VM 扩展添加到 Azure Windows Server VM。 安装失败并
我是一名优秀的程序员,十分优秀!