Skip to content

Create an AWS domain identity with optional delegated authorized sending

License

Notifications You must be signed in to change notification settings

thoughtbot/terraform-ses-domain-identity

Repository files navigation

SES Domain Identity Terraform Module

Manage an SES domain identity using Terraform.

Major features:

  • Creates an SNS topic for bounces and complaints
  • Validates the domain identity using Route 53 record sets
  • Adds DKIM validates using Route 53 record sets
  • Includes optional delegated authorized sending to other AWS accounts

Example

module "domain_identity" {
  source = "[email protected]:thoughtbot/terraform-ses-domain-identity.git?ref=v0.4.0"

  domain = "example.com"

  # Set to false if you want to manually validate DNS and set up DKIM
  create_records = true

  # Optional; other AWS accounts which should be allowed to use this identity
  authorized_accounts = ["123456789083", "234567890834"]
}

Requirements

Name Version
terraform >= 0.14.0
aws ~> 5.0

Providers

Name Version
aws.identity ~> 5.0
aws.route53 ~> 5.0

Modules

No modules.

Resources

Name Type
aws_route53_record.dkim resource
aws_route53_record.domain_identity resource
aws_ses_domain_dkim.mail resource
aws_ses_domain_identity.this resource
aws_ses_domain_identity_verification.mail resource
aws_ses_identity_notification_topic.bounce resource
aws_ses_identity_notification_topic.complaint resource
aws_ses_identity_policy.this resource
aws_sns_topic.this resource
aws_iam_policy_document.this data source
aws_route53_zone.domain data source

Inputs

Name Description Type Default Required
authorized_accounts Other AWS account IDs authorized to use this domain identity list(string) [] no
create_records Set to false to disable Route 53 record creation bool true no
domain The domain from which emails are sent string n/a yes
namespace Namespace to prefix resource list(string) [] no
tags Tags which should be applied to created resources map(string) {} no
zone_domain Name of the AWS Route53; defaults to domain identity string null no

Outputs

Name Description
arn ARN of the created domain identity
notifications_topic_arn ARN of the SNS topic created for complaints and bounces

Contributing

Please see CONTRIBUTING.md.

License

These modules are Copyright © 2021 Joe Ferris and thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About thoughtbot

thoughtbot

This repo is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software! See our other projects. We are available for hire.

About

Create an AWS domain identity with optional delegated authorized sending

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published