Resource: awsSesIdentityPolicy
Manages a SES Identity Policy. More information about SES Sending Authorization Policies can be found in the SES Developer Guide.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsSesDomainIdentityExample = new aws.sesDomainIdentity.SesDomainIdentity(
this,
"example",
{
domain: "example.com",
}
);
const dataAwsIamPolicyDocumentExample =
new aws.dataAwsIamPolicyDocument.DataAwsIamPolicyDocument(this, "example_1", {
statement: [
{
actions: ["SES:SendEmail", "SES:SendRawEmail"],
principals: [
{
identifiers: ["*"],
type: "AWS",
},
],
resources: [awsSesDomainIdentityExample.arn],
},
],
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAwsIamPolicyDocumentExample.overrideLogicalId("example");
const awsSesIdentityPolicyExample = new aws.sesIdentityPolicy.SesIdentityPolicy(
this,
"example_2",
{
identity: awsSesDomainIdentityExample.arn,
name: "example",
policy: dataAwsIamPolicyDocumentExample.json,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSesIdentityPolicyExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
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.
Attributes Reference
No additional attributes are exported.
Import
SES Identity Policies can be imported using the identity and policy name, separated by a pipe character (|
), e.g.,