Skip to content

Resource: awsSesv2EmailIdentityMailFromAttributes

Terraform resource for managing an AWS SESv2 (Simple Email V2) Email Identity Mail From Attributes.

Example Usage

Basic 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 awsSesv2EmailIdentityExample =
  new aws.sesv2EmailIdentity.Sesv2EmailIdentity(this, "example", {
    emailIdentity: "example.com",
  });
const awsSesv2EmailIdentityMailFromAttributesExample =
  new aws.sesv2EmailIdentityMailFromAttributes.Sesv2EmailIdentityMailFromAttributes(
    this,
    "example_1",
    {
      behaviorOnMxFailure: "REJECT_MESSAGE",
      emailIdentity: awsSesv2EmailIdentityExample.emailIdentity,
      mailFromDomain: `subdomain.\${${awsSesv2EmailIdentityExample.emailIdentity}}`,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsSesv2EmailIdentityMailFromAttributesExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • emailIdentity - (Required) The verified email identity.
  • behaviorOnMxFailure - (Optional) The action to take if the required MX record isn't found when you send an email. Valid values: USE_DEFAULT_VALUE, REJECT_MESSAGE.
  • mailFromDomain - (Optional) The custom MAIL FROM domain that you want the verified identity to use. Required if behaviorOnMxFailure is REJECT_MESSAGE.

Attributes Reference

No additional attributes are exported.

Import

SESv2 (Simple Email V2) Email Identity Mail From Attributes can be imported using the emailIdentity, e.g.,

$ terraform import aws_sesv2_email_identity_mail_from_attributes.example example.com