Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mailgun env variables #103

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 6 additions & 1 deletion modules/keyvault/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

Expand Down
5 changes: 5 additions & 0 deletions modules/web/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
25 changes: 25 additions & 0 deletions modules/web/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Loading