mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Update email provider settings in TF to use Mailgun (#2978)
New TF variables have been added to both Staging and Production workspaces under the key `mailgun_server_api_token`
This commit is contained in:
@@ -2,7 +2,7 @@ alias Domain.{Repo, Accounts, Auth, Actors, Relays, Gateways, Resources, Policie
|
||||
|
||||
# Seeds can be run both with MIX_ENV=prod and MIX_ENV=test, for test env we don't have
|
||||
# an adapter configured and creation of email provider will fail, so we will override it here.
|
||||
System.put_env("OUTBOUND_EMAIL_ADAPTER", "Elixir.Swoosh.Adapters.Postmark")
|
||||
System.put_env("OUTBOUND_EMAIL_ADAPTER", "Elixir.Swoosh.Adapters.Mailgun")
|
||||
|
||||
# This function is used to update fields if STATIC_SEEDS is set,
|
||||
# which helps with static docker-compose environment for local development.
|
||||
|
||||
@@ -510,15 +510,18 @@ locals {
|
||||
# Emails
|
||||
{
|
||||
name = "OUTBOUND_EMAIL_ADAPTER"
|
||||
value = "Elixir.Swoosh.Adapters.Postmark"
|
||||
value = "Elixir.Swoosh.Adapters.Mailgun"
|
||||
},
|
||||
{
|
||||
name = "OUTBOUND_EMAIL_FROM"
|
||||
value = "support@firezone.dev"
|
||||
value = "notifications@firezone.dev"
|
||||
},
|
||||
{
|
||||
name = "OUTBOUND_EMAIL_ADAPTER_OPTS"
|
||||
value = "{\"api_key\":\"${var.postmark_server_api_token}\"}"
|
||||
name = "OUTBOUND_EMAIL_ADAPTER_OPTS"
|
||||
value = jsonencode({
|
||||
api_key = var.mailgun_server_api_token,
|
||||
domain = local.tld
|
||||
})
|
||||
},
|
||||
# Feature Flags
|
||||
{
|
||||
|
||||
@@ -33,6 +33,10 @@ variable "postmark_server_api_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "mailgun_server_api_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "pagerduty_auth_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
@@ -463,16 +463,17 @@ locals {
|
||||
# Emails
|
||||
{
|
||||
name = "OUTBOUND_EMAIL_ADAPTER"
|
||||
value = "Elixir.Swoosh.Adapters.Postmark"
|
||||
value = "Elixir.Swoosh.Adapters.Mailgun"
|
||||
},
|
||||
{
|
||||
name = "OUTBOUND_EMAIL_FROM"
|
||||
value = "support@firez.one"
|
||||
value = "notifications@firez.one"
|
||||
},
|
||||
{
|
||||
name = "OUTBOUND_EMAIL_ADAPTER_OPTS"
|
||||
value = jsonencode({
|
||||
api_key = var.postmark_server_api_token
|
||||
api_key = var.mailgun_server_api_token,
|
||||
domain = local.tld
|
||||
})
|
||||
},
|
||||
# Feature Flags
|
||||
|
||||
@@ -27,3 +27,7 @@ variable "slack_alerts_auth_token" {
|
||||
variable "postmark_server_api_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "mailgun_server_api_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user