diff --git a/main.tf b/main.tf index 65cdc96..5a89c02 100644 --- a/main.tf +++ b/main.tf @@ -162,6 +162,11 @@ module "web" { public_laskugeneraattori_url = "https://${module.invoicing.fqdn}" public_legacy_url = "https://old.tietokilta.fi" digitransit_subscription_key = module.keyvault.secrets["digitransit-subscription-key"] + mailgun_sender = module.keyvault.secrets["mailgun-sender"] + mailgun_receiver = module.keyvault.secrets["mailgun-receiver"] + mailgun_api_key = module.keyvault.secrets["mailgun-api-key"] + mailgun_domain = module.keyvault.secrets["mailgun-domain"] + mailgun_url = module.keyvault.secrets["mailgun-url"] } resource "azurerm_key_vault_secret" "cms_password" { name = "cms-password" diff --git a/modules/keyvault/main.tf b/modules/keyvault/main.tf index dc909ee..60a9c31 100644 --- a/modules/keyvault/main.tf +++ b/modules/keyvault/main.tf @@ -86,7 +86,12 @@ locals { "muistinnollaus-paytrail-secret-key", "mongodb-atlas-public-key", "mongodb-atlas-private-key", - "github-challenge-value" + "github-challenge-value", + "mailgun-sender", + "mailgun-receiver", + "mailgun-api-key", + "mailgun-domain", + "mailgun-url" ] } diff --git a/modules/web/main.tf b/modules/web/main.tf index ca1d611..0cf2a76 100644 --- a/modules/web/main.tf +++ b/modules/web/main.tf @@ -134,6 +134,11 @@ resource "azurerm_linux_web_app" "cms" { AZURE_DOCUMENTS_STORAGE_CONTAINER_NAME = azurerm_storage_container.documents_container.name GOOGLE_OAUTH_CLIENT_ID = var.google_oauth_client_id GOOGLE_OAUTH_CLIENT_SECRET = var.google_oauth_client_secret + MAILGUN_SENDER = var.mailgun_sender + MAILGUN_RECEIVER = var.mailgun_receiver + MAILGUN_API_KEY = var.mailgun_api_key + MAILGUN_DOMAIN = var.mailgun_domain + MAILGUN_URL = var.mailgun_url } } diff --git a/modules/web/variables.tf b/modules/web/variables.tf index 94c2e37..f0c7bcb 100644 --- a/modules/web/variables.tf +++ b/modules/web/variables.tf @@ -57,3 +57,28 @@ variable "digitransit_subscription_key" { type = string sensitive = true } + +variable "mailgun_sender" { + type = string + sensitive = true +} + +variable "mailgun_receiver" { + type = string + sensitive = true +} + +variable "mailgun_api_key" { + type = string + sensitive = true +} + +variable "mailgun_domain" { + type = string + sensitive = true +} + +variable "mailgun_url" { + type = string + sensitive = true +}