gpt4 book ai didi

azure - 如何使用 azurerm_virtual_machine_scale_set_extension 中的设置

转载 作者:行者123 更新时间:2023-12-03 03:55:05 31 4
gpt4 key购买 nike

尝试使用 azurerm_virtual_machine_scale_set_extension

resource "azurerm_virtual_machine_scale_set_extension" "executor" {
name = "example"
virtual_machine_scale_set_id = azurerm_linux_virtual_machine_scale_set.executor.id
publisher = "Microsoft.Azure.Extensions"
type = "CustomScript"
type_handler_version = "2.0"
settings = jsonencode({
"commandToExecute" = "sudo yum update -y "
"commandToExecute1" = "sudo yum install java-1.8.0-openjdk -y"
"commandToExecute2" = "export IPZK=" + var.zk_ip
})
}

输出为


on modules/exec_scale_set/main.tf line 60, in resource "azurerm_virtual_machine_scale_set_extension" "executor":
60: "commandToExecute2" = "export IPZK=" + var.zk_ip

Unsuitable value for left operand: a number is required.

如何将变量传递给“commandToExecute2”=“export IPZK=”+var.zk_ip?

最佳答案

“export DREMIO_IPZK=${var.zk_ip}”这是一个答案

关于azure - 如何使用 azurerm_virtual_machine_scale_set_extension 中的设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64880064/

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