Move aws ses dkim keys into terraform
This commit is contained in:
parent
e17156a8ca
commit
6f9f888478
12 changed files with 95 additions and 20 deletions
modules/infrastructure
4
modules/infrastructure/aws-ses.tf
Normal file
4
modules/infrastructure/aws-ses.tf
Normal file
|
@ -0,0 +1,4 @@
|
|||
resource "aws_sesv2_email_identity" "domains" {
|
||||
for_each = var.email_domains
|
||||
email_identity = each.value
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = "~> 5.0"
|
||||
}
|
||||
contabo = {
|
||||
source = "contabo/contabo"
|
||||
version = "~> 0.1.26"
|
||||
|
|
|
@ -70,3 +70,10 @@ output "scaleway_registry_endpoint_public" {
|
|||
output "scaleway_registry_endpoint_private" {
|
||||
value = scaleway_registry_namespace.private.endpoint
|
||||
}
|
||||
|
||||
output "aws_ses_dkim" {
|
||||
value = {
|
||||
for key, dkim in aws_sesv2_email_identity.domains : key => dkim.dkim_signing_attributes[0].tokens
|
||||
}
|
||||
sensitive = true
|
||||
}
|
||||
|
|
|
@ -41,3 +41,7 @@ variable "hosts" {
|
|||
datacenter = optional(string)
|
||||
}))
|
||||
}
|
||||
|
||||
variable "email_domains" {
|
||||
type = set(string)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue