feat: add smtp info
This commit is contained in:
@@ -9,3 +9,10 @@ CLOUDFLARE_API_TOKEN="your-cloudflare-api-token"
|
|||||||
CLOUDFLARE_ACCOUNT_ID="your-cloudflare-account-id"
|
CLOUDFLARE_ACCOUNT_ID="your-cloudflare-account-id"
|
||||||
CLOUDFLARE_ZONE_ID="your-cloudflare-zone-id"
|
CLOUDFLARE_ZONE_ID="your-cloudflare-zone-id"
|
||||||
DOMAIN="yourdomain.com"
|
DOMAIN="yourdomain.com"
|
||||||
|
|
||||||
|
# SMTP
|
||||||
|
MAIL_FROM=your-email@example.com
|
||||||
|
MAIL_HOST=smtp.gmail.com
|
||||||
|
MAIL_PORT=587
|
||||||
|
MAIL_USERNAME=your-email@example.com
|
||||||
|
MAIL_PASSWORD=your-smtp-password
|
||||||
35
modules/00-globals/smtp/main.tf
Normal file
35
modules/00-globals/smtp/main.tf
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
dotenv = {
|
||||||
|
source = "germanbrew/dotenv"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data "dotenv" "smtp_config" {}
|
||||||
|
|
||||||
|
// Outputs
|
||||||
|
output "mail_from" {
|
||||||
|
description = "Mail from address"
|
||||||
|
value = data.dotenv.smtp_config.entries.MAIL_FROM
|
||||||
|
}
|
||||||
|
|
||||||
|
output "mail_host" {
|
||||||
|
description = "Mail host"
|
||||||
|
value = data.dotenv.smtp_config.entries.MAIL_HOST
|
||||||
|
}
|
||||||
|
|
||||||
|
output "mail_port" {
|
||||||
|
description = "Mail port"
|
||||||
|
value = data.dotenv.smtp_config.entries.MAIL_PORT
|
||||||
|
}
|
||||||
|
|
||||||
|
output "mail_username" {
|
||||||
|
description = "Mail username"
|
||||||
|
value = data.dotenv.smtp_config.entries.MAIL_USERNAME
|
||||||
|
}
|
||||||
|
|
||||||
|
output "mail_password" {
|
||||||
|
description = "Mail password"
|
||||||
|
value = data.dotenv.smtp_config.entries.MAIL_PASSWORD
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user