-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
42 lines (39 loc) · 1.33 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#=====================================
# SES information
#=====================================
output "email_identity" {
description = "The email identity."
value = try(aws_sesv2_email_identity.this[0].email_identity, "")
}
output "sending_pool_name" {
description = "The name of the SES sending pool to associate the domain with."
value = try(aws_sesv2_dedicated_ip_pool.this[0].pool_name, aws_sesv2_configuration_set.this[0].delivery_options[0].sending_pool_name, "")
}
output "iam_sending_group_name" {
description = "The IAM group name."
value = try(aws_iam_group.ses_users[0].name, "")
}
#=====================================
# DNS Record Data
#=====================================
output "dkim_records" {
description = "The DNS records required for Amazon SES validation and DKIM setup."
value = tomap({
for record in flatten([
for attribute in aws_sesv2_email_identity.this[0].dkim_signing_attributes : [
for token in attribute.tokens : {
token = token
name = "${token}._domainkey.${var.domain}"
type = "CNAME"
ttl = "600"
records = ["${token}.dkim.amazonses.com"]
}
]
]) : record.token => {
name = record.name
type = record.type
ttl = record.ttl
records = record.records
}
})
}