gpt4 book ai didi

azurerm_virtual_machine_extension - ArtifactVersionNotFound

转载 作者:行者123 更新时间:2023-12-02 06:00:53 24 4
gpt4 key购买 nike

我想要将 azurerm_virtual_machine_extension 资源添加到现有的 VM 资源中:

resource "azurerm_virtual_machine_extension" "vm-bootstrap" {
count = "1"
name = "bootstrap"
virtual_machine_id = ...
publisher = "Microsoft.Azure.Extensions"
type = "CustomScript"
type_handler_version = "2.1"
auto_upgrade_minor_version = "false"

settings = <<SETTINGS
{

"script": "${filebase64("bootstrap.sh")}"

}
SETTINGS
}

运行 terraform apply 返回并出现以下错误:

Error: compute.VirtualMachineExtensionsClient#CreateOrUpdate: Failure sending request:StatusCode=404 -- Original Error: Code="ArtifactVersionNotFound" Message="No version found inthe artifact repository that satisfies the requested version '2.1' for VM extension withpublisher 'Microsoft.Azure.Extensions' and type 'CustomScript'."

虽然看起来 VM 扩展存在:

az vm extension image list-versions -n CustomScript --publisher Microsoft.Azure.Extensions --lo
cation westeurope --query "[].name" -o tsv | sort -u
2.0.0
2.0.1
2.0.2
2.0.3
2.0.4
2.0.5
2.0.6
2.0.7
2.1.1
2.1.2
2.1.3
2.1.6

Terraform v1.0.11,

azure-cli:“2.30.0”,

azure-cli-core:“2.30.0”,

azure-cli-telemetry:“1.0.6”,

“扩展”:{}

您能指点一下吗?

最佳答案

该问题是由虚拟机扩展版本不匹配引起的,如果您尝试始终指定“最新”而不是特定版本,则可以解决该问题。我的情况也是如此。

关于azurerm_virtual_machine_extension - ArtifactVersionNotFound,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70228076/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com