我尝试使用 terraform 模块https://github.com/QuiNovas/terraform-aws-iot-topic-rule创建这样的物联网规则
module "iot_rule_2" {
name = "xxx"
sql_query = "xxx"
source = "QuiNovas/iot-topic-rule/aws"
version = "1.0.4"
republish = [{topic = "$$aws/things/${topic(3)}/shadow/name/datamodel/update"}]
}
我得到了错误
Error: Call to unknown function
│
│ on main.tf line 52, in module "iot_rule_2":
│ 52: republish = [{topic = "$$aws/things/${topic(3)}/shadow/name/datamodel/update"}]
│
│ There is no function named "topic".
主题函数存在于 AWS https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-functions.html