小编vot*_*roe的帖子

如何从Terraform中的对象列表中获取对象?

我有以下对象变量列表:

variable "objects" {
  type = "list"
  description = "list of objects
  default = [
      {
        id = "name1"
        attribute = "a"
      },
      {
        id = "name2"
        attribute = "a,b"
      },
      {
        id = "name3"
        attribute = "d"
      }
  ]
}
Run Code Online (Sandbox Code Playgroud)

如何获取id =“ name2”的元素?

terraform

6
推荐指数
3
解决办法
7333
查看次数

标签 统计

terraform ×1