Resource: aws_sesv2_email_identity

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

Example Usage

Basic Usage

Email Address Identity

resource "aws_sesv2_email_identity" "example" {
  email_identity = "testing@example.com"
}

Domain Identity

resource "aws_sesv2_email_identity" "example" {
  email_identity = "example.com"
}

Configuration Set

resource "aws_sesv2_configuration_set" "example" {
  configuration_set_name = "example"
}

resource "aws_sesv2_email_identity" "example" {
  email_identity         = "example.com"
  configuration_set_name = aws_sesv2_configuration_set.example.configuration_set_name
}

DKIM Signing Attributes (BYODKIM)

resource "aws_sesv2_email_identity" "example" {
  email_identity = "example.com"

  dkim_signing_attributes {
    domain_signing_private_key = "MIIJKAIBAAKCAgEA2Se7p8zvnI4yh+Gh9j2rG5e2aRXjg03Y8saiupLnadPH9xvM..." #PEM private key without headers or newline characters
    domain_signing_selector    = "example"
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

dkim_signing_attributes

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 SESv2 (Simple Email V2) Email Identity using the email_identity. For example:

import {
  to = aws_sesv2_email_identity.example
  id = "example.com"
}

Using terraform import, import SESv2 (Simple Email V2) Email Identity using the email_identity. For example:

% terraform import aws_sesv2_email_identity.example example.com