【发布时间】:2020-07-06 11:20:19
【问题描述】:
我正在使用 Terraform v0.12.24 和 provider.azurerm v2.2.0 当我尝试创建规模集 VM 时,出现以下错误:
错误:compute.VirtualMachineScaleSetsClient#CreateOrUpdate:失败 发送请求:StatusCode=400 -- 原始错误: Code="InvalidParameter" Message="参数值 linuxConfiguration.ssh.publicKeys.path 无效。” Target="linuxConfiguration.ssh.publicKeys.path"
在 scaleset.tf 第 1 行,在资源中 “azurerm_virtual_machine_scale_set”“演示”:1:资源 "azurerm_virtual_machine_scale_set" "演示" {
我正在使用 Windows 10 进行 terraform 配置。我的 os_profile_linux_config 如下:
storage_profile_image_reference {
publisher = "Canonical"
offer = "UbuntuServer"
sku = "18.04-LTS"
version = "latest"
}
os_profile_linux_config {
disable_password_authentication = true
ssh_keys {
key_data = file("C:/Users/jack/Documents/key/id_rsa.pub")
path = "C:/Users/jack/Documents/key"
}
}
首先,我尝试了两个不同的密钥对。一个由 puttygen 创建,另一个由 ssh-keygen 和 git bash 创建。我对他们两个都有同样的错误。 你有什么想法吗?
【问题讨论】:
标签: terraform terraform-provider-azure