Manages a SES Identity Policy. More information about SES Sending Authorization Policies can be found in the SES Developer Guide.
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
}
This resource supports the following arguments:
identity
- (Required) Name or Amazon Resource Name (ARN) of the SES Identity.name
- (Required) Name of the policy.policy
- (Required) JSON string of the policy. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide.This resource exports no additional attributes.
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'