我正在尝试使用以下 terraform 代码创建 aws cloudwatch 事件目标:
resource "aws_cloudwatch_event_rule" "push-event-processing-sqs" {
name = "Push-to-sqs-event-processing-every-2-hours"
description = "Push to SQS event-processing every 2 hours"
schedule_expression = "cron(0 /2 ? * * *)"
is_enabled = "false"
}
resource "aws_cloudwatch_event_target" "target-event-processing-sqs" {
arn = "arn:aws:sqs:us-west-2:123456789:my-sqs-queue-dev.fifo"
rule = "${aws_cloudwatch_event_rule.push-event-processing-sqs.name}"
sqs_target = "foobar"
}
我得到的错误是:
sqs_target:应该是一个列表
我查看了https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target.html,但没有得到太多帮助。
应该是什么样的清单?