我正在尝试使用terraform创建AWS SES收据规则。 这是我的terraform脚本中的条目:
resource "aws_ses_receipt_rule" "EmailRule" { name = "EmailRule" rule_set_name = "default-rule-set" recipients [".example.com"] enabled = "true" scan_enabled ="true" s3_action { bucket_name = "beta" object_key_prefix = "inbox/" topic_arn = "beta-email-sns" } }运行terraform计划时,我收到此错误:
加载配置时出错:解析C:\ Tools \ deploy \ terraform \ aws \ prod \ vpc.tf时出错:在66:14:预期:IDENT | STRING | 分配| LBRACE得到了:LBRACK
第66行是收件人的行。
根据文档,我使用正确的语法:
https://www.terraform.io/docs/providers/aws/r/ses_receipt_rule.html
I am trying to use terraform to create an AWS SES receipt rule. This is the entry in my terraform script:
resource "aws_ses_receipt_rule" "EmailRule" { name = "EmailRule" rule_set_name = "default-rule-set" recipients [".example.com"] enabled = "true" scan_enabled ="true" s3_action { bucket_name = "beta" object_key_prefix = "inbox/" topic_arn = "beta-email-sns" } }When running terraform plan, I get this error:
Error loading config: Error parsing C:\Tools\deploy\terraform\aws\prod\vpc.tf: At 66:14: expected: IDENT | STRING | ASSIGN | LBRACE got: LBRACK
Line 66 is the line with recipients on it.
According to the documentation I am using the right syntax:
https://www.terraform.io/docs/providers/aws/r/ses_receipt_rule.html
最满意答案
你错过了一个=收件人。 错误消息告诉你这个; 预期'ASSIGN'是赋值或赋值运算符的缩写。
它应该是:
recipients = [".example.com"]
You're missing an = for recipients. The error message is telling you this; expected 'ASSIGN' is short for assignment, or the assignment operator.
It should be:
recipients = [".example.com"]
更多推荐
发布评论