Resource: aws_ses_receipt_rule

Provides an SES receipt rule resource

Example Usage

# Add a header to the email and store it in S3
resource "aws_ses_receipt_rule" "store" {
  name          = "store"
  rule_set_name = "default-rule-set"
  recipients    = ["karen@example.com"]
  enabled       = true
  scan_enabled  = true

  add_header_action {
    header_name  = "Custom-Header"
    header_value = "Added by SES"
    position     = 1
  }

  s3_action {
    bucket_name = "emails"
    position    = 2
  }
}

Argument Reference

This resource supports the following arguments:

Add header actions support the following:

Bounce actions support the following:

Lambda actions support the following:

S3 actions support the following:

SNS actions support the following:

Stop actions support the following:

WorkMail actions support the following:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import SES receipt rules using the ruleset name and rule name separated by :. For example:

import {
  to = aws_ses_receipt_rule.my_rule
  id = "my_rule_set:my_rule"
}

Using terraform import, import SES receipt rules using the ruleset name and rule name separated by :. For example:

% terraform import aws_ses_receipt_rule.my_rule my_rule_set:my_rule