解析aws

编程入门 行业动态 更新时间:2024-10-24 16:33:58
解析aws_ses_receipt_rule的terraform错误(Parsing error in terraform for aws_ses_receipt_rule)

我正在尝试使用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"]

更多推荐

本文发布于:2023-07-30 00:08:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1320840.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:aws

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!