Resource: aws_ses_domain_dkim

Provides an SES domain DKIM generation resource.

Domain ownership needs to be confirmed first using ses_domain_identity Resource

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Example Usage

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

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

resource "aws_route53_record" "example_amazonses_dkim_record" {
  count   = 3
  zone_id = "ABCDEFGHIJ123"
  name    = "${aws_ses_domain_dkim.example.dkim_tokens[count.index]}._domainkey"
  type    = "CNAME"
  ttl     = "600"
  records = ["${aws_ses_domain_dkim.example.dkim_tokens[count.index]}.dkim.amazonses.com"]
}

Import

In Terraform v1.5.0 and later, use an import block to import DKIM tokens using the domain attribute. For example:

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

Using terraform import, import DKIM tokens using the domain attribute. For example:

% terraform import aws_ses_domain_dkim.example example.com