{"id":15156353,"url":"https://github.com/trussworks/terraform-aws-ses-domain","last_synced_at":"2025-09-06T22:32:46.685Z","repository":{"id":35204633,"uuid":"150166835","full_name":"trussworks/terraform-aws-ses-domain","owner":"trussworks","description":"Configures a domain hosted on Route53 to work with AWS Simple Email Service (SES). ","archived":false,"fork":false,"pushed_at":"2023-06-08T19:34:33.000Z","size":349,"stargazers_count":60,"open_issues_count":2,"forks_count":44,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-31T01:23:43.070Z","etag":null,"topics":["aws","aws-ses","ses","terraform","terraform-modules"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/trussworks/ses-domain","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trussworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-24T20:50:37.000Z","updated_at":"2024-08-29T14:12:38.000Z","dependencies_parsed_at":"2024-06-18T21:35:44.548Z","dependency_job_id":"79a0d164-f473-4921-b88a-1dff84f921e4","html_url":"https://github.com/trussworks/terraform-aws-ses-domain","commit_stats":{"total_commits":169,"total_committers":25,"mean_commits":6.76,"dds":0.7159763313609467,"last_synced_commit":"b810d38847a1c6fd05ab2bd3fd78b8c7c4dfe78e"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussworks%2Fterraform-aws-ses-domain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussworks%2Fterraform-aws-ses-domain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussworks%2Fterraform-aws-ses-domain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trussworks%2Fterraform-aws-ses-domain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trussworks","download_url":"https://codeload.github.com/trussworks/terraform-aws-ses-domain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237973346,"owners_count":19395847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-ses","ses","terraform","terraform-modules"],"created_at":"2024-09-26T19:20:25.359Z","updated_at":"2025-02-09T15:33:02.218Z","avatar_url":"https://github.com/trussworks.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"Configures a domain hosted on Route53 to work with AWS Simple Email Service (SES).\n\n## Prerequisites\n\n- Ensure [terraform](https://www.terraform.io/intro/getting-started/install.html) is installed\n- Ensure domain is registered in [route53](https://aws.amazon.com/route53/)\n- Ensure an s3 bucket exists and SES has write permissions to it\n- If you have an existing rule set you can skip creating the dependent resource\n- Route53 zone id can be obtained by looking up the domain in route53 service\n\n## Getting Started\n\n1. Import the module called `ses_domain` and update its source property to `trussworks/ses-domain/aws` and run `terrafrom init`\n2. The next step is to configure the module with [minimum values](#usage) for SES to start working\n3. Once fully configured run `terraform plan` to see the execution plan and `terrafrom apply` to stand up SES\n\nCreates the following resources:\n\n- MX record pointing to AWS's SMTP endpoint\n- TXT record for SPF validation\n- Custom MAIL FROM domain\n- CNAME records for DKIM verification\n- SES Verfication for the domain\n\n### NOTES\n\n- SES is only available in a [limited number of AWS Regions](https://docs.aws.amazon.com/general/latest/gr/ses.html).\n- SES out of the box locks the service in development mode; please see this documentation on how to make it production ready. Until the service is in production mode you can only send emails to confirmed email accounts denoted in `from_addresses`\n\n## Usage\n\nSee [examples](examples/) for functional examples on how to use this module.\n\n```hcl\nmodule \"ses_domain\" {\n  source             = \"trussworks/ses-domain/aws\"\n  domain_name        = \"example.com\"\n  mail_from_domain   = \"email.example.com\"\n  route53_zone_id    = data.aws_route53_zone.ses_domain.zone_id\n  from_addresses     = [\"email1@example.com\", \"email2@example.com\"]\n  dmarc_rua          = \"something@example.com\"\n  receive_s3_bucket  = \"S3_bucket_with_write_permissions\"\n  receive_s3_prefix  = \"path_to_store_received_emails\"\n  ses_rule_set       = \"name-of-the-ruleset\"\n}\n\nresource \"aws_ses_receipt_rule_set\" \"name-of-the-ruleset\" {\n  rule_set_name = \"name-of-the-ruleset\"\n}\n\ndata \"aws_route53_zone\" \"ses_domain\" {\n  name = \"example.com\"\n}\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e= 1.0 |\n| aws | \u003e= 3.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| aws | \u003e= 3.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_route53_record.dkim](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |\n| [aws_route53_record.mx_receive](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |\n| [aws_route53_record.mx_send_mail_from](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |\n| [aws_route53_record.spf_mail_from](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |\n| [aws_route53_record.txt_dmarc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |\n| [aws_ses_receipt_rule.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ses_receipt_rule) | resource |\n| [aws_sesv2_email_identity.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sesv2_email_identity) | resource |\n| [aws_sesv2_email_identity_mail_from_attributes.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sesv2_email_identity_mail_from_attributes) | resource |\n| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| dmarc\\_p | DMARC Policy for organizational domains (none, quarantine, reject). | `string` | `\"none\"` | no |\n| dmarc\\_rua | DMARC Reporting URI of aggregate reports, expects an email address. | `string` | n/a | yes |\n| domain\\_name | The domain name to configure SES. | `string` | n/a | yes |\n| enable\\_dmarc | Control whether to create DMARC TXT record. | `bool` | `true` | no |\n| enable\\_incoming\\_email | Control whether or not to handle incoming emails. | `bool` | `true` | no |\n| enable\\_spf\\_record | Control whether or not to set SPF records. | `bool` | `true` | no |\n| from\\_addresses | List of email addresses to catch bounces and rejections. | `list(string)` | `null` | no |\n| mail\\_from\\_domain | Subdomain (of the route53 zone) which is to be used as MAIL FROM address | `string` | n/a | yes |\n| receive\\_s3\\_bucket | Name of the S3 bucket to store received emails (required if enable\\_incoming\\_email is true). | `string` | `\"\"` | no |\n| receive\\_s3\\_kms\\_key\\_arn | The ARN of the KMS key for S3 objects of received emails (effective if enable\\_incoming\\_email is true). | `string` | `null` | no |\n| receive\\_s3\\_prefix | The key prefix of the S3 bucket to store received emails (required if enable\\_incoming\\_email is true). | `string` | `\"\"` | no |\n| route53\\_zone\\_id | Route53 host zone ID to enable SES. | `string` | n/a | yes |\n| ses\\_rule\\_set | Name of the SES rule set to associate rules with. | `string` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| ses\\_identity\\_arn | SES identity ARN. |\n\u003c!-- END_TF_DOCS --\u003e\n\n## Developer Setup\n\nInstall dependencies (macOS)\n\n```shell\nbrew install pre-commit go terraform terraform-docs\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrussworks%2Fterraform-aws-ses-domain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrussworks%2Fterraform-aws-ses-domain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrussworks%2Fterraform-aws-ses-domain/lists"}