Resource: aws_ses_identity_policy

Manages a SES Identity Policy. More information about SES Sending Authorization Policies can be found in the SES Developer Guide.

Example Usage

resource "aws_ses_domain_identity" "example" {
  domain = "example.com"
}

data "aws_iam_policy_document" "example" {
  statement {
    actions   = ["SES:SendEmail", "SES:SendRawEmail"]
    resources = [aws_ses_domain_identity.example.arn]

    principals {
      identifiers = ["*"]
      type        = "AWS"
    }
  }
}

resource "aws_ses_identity_policy" "example" {
  identity = aws_ses_domain_identity.example.arn
  name     = "example"
  policy   = data.aws_iam_policy_document.example.json
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports no additional attributes.

Import

In Terraform v1.5.0 and later, use an import block to import SES Identity Policies using the identity and policy name, separated by a pipe character (|). For example:

import {
  to = aws_ses_identity_policy.example
  id = "example.com|example"
}

Using terraform import, import SES Identity Policies using the identity and policy name, separated by a pipe character (|). For example:

% terraform import aws_ses_identity_policy.example 'example.com|example'