首页 > 解决方案 > 如何使用 TestCheckResourceAttr 在验收测试中检查 TypeMap?

问题描述

在我的 tf 状态文件中,TypeMap 变量看起来像任何其他属性:

"attributes": {
            "foo": {
              "aaa": "12345",
              "bbb": "23456",
            },

那是我跑步时说的

resource.TestCheckResourceAttr(fullTopicResourceLabel, "foo", ...),

它说

_label: Attribute 'foo' not found

标签: terraform

解决方案


推荐阅读