【发布时间】:2021-11-09 14:01:52
【问题描述】:
我有带有文件的 terraform 模块: 主文件 变量.tf
在我定义的变量中:
variable "environment" {
type = string
description = "The environment the module is being deployed to, e.g: Test, Integrate or Production"
}
locals {
scale_in_protection = var.environment == "production" || "integrate" ? "true" : "false"
}
我收到此错误:
Releasing state lock. This may take a few moments...
╷
│ Error: Invalid operand
│
│ on ..\..\modules\jitsi\variables.tf line 99, in locals:
│ 99: scale_in_protection = var.environment == "production" || "integrate" ? "true" : "false"
│
│ Unsuitable value for right operand: a bool is required.
【问题讨论】:
标签: amazon-web-services terraform