Skip to content

Commit 1367b46

Browse files
authored
AWS SES DKIM (#445)
1 parent fbbac86 commit 1367b46

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# What is DKIM
2+
Docs: https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim.html
3+
DomainKeys Identified Mail (DKIM) is an email security standard designed to make sure that an email that claims to have come from a specific domain was indeed authorized by the owner of that domain. It uses public-key cryptography to sign an email with a private key. Recipient servers can then use a public key published to a domain's DNS to verify that parts of the email have not been modified during the transit.
4+
5+
6+
This terraform is configuring an Easy DKIM: SES generates a public-private key pair and automatically adds a DKIM signature to every message that you send from that identity, see Easy DKIM in Amazon SES.
7+
8+
The CNAMEs records outcomes of this terraform can be set up in DNS Managment like cloudflare, namecheap, so on.
9+
10+
references:
11+
- https://www.youtube.com/watch?v=C7rRSaP6fdA&t=216s
12+
13+
14+
## Requirements
15+
16+
No requirements.
17+
18+
## Providers
19+
20+
| Name | Version |
21+
|------|---------|
22+
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
23+
24+
## Modules
25+
26+
No modules.
27+
28+
## Resources
29+
30+
| Name | Type |
31+
|------|------|
32+
| [aws_ses_domain_dkim.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ses_domain_dkim) | resource |
33+
| [aws_ses_domain_identity.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ses_domain_identity) | resource |
34+
35+
## Inputs
36+
37+
| Name | Description | Type | Default | Required |
38+
|------|-------------|------|---------|:--------:|
39+
| <a name="input_domain"></a> [domain](#input\_domain) | Verified domain name to generate DKIM tokens for | `any` | n/a | yes |
40+
41+
## Outputs
42+
43+
| Name | Description |
44+
|------|-------------|
45+
| <a name="output_dkim_tokens"></a> [dkim\_tokens](#output\_dkim\_tokens) | DKIM tokens generated by SES. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "aws_ses_domain_identity" "this" {
2+
domain = var.domain
3+
}
4+
resource "aws_ses_domain_dkim" "this" {
5+
domain = aws_ses_domain_identity.this.domain
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
output "dkim_tokens" {
2+
description = "DKIM tokens generated by SES."
3+
value = aws_ses_domain_dkim.this.dkim_tokens
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
variable "domain" {
2+
description = "Verified domain name to generate DKIM tokens for"
3+
}
4+

0 commit comments

Comments
 (0)