forked from auth0/terraform-provider-auth0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FND-1279: First pass of Custom email terraform addition.
- Loading branch information
1 parent
beba4b9
commit 23c8865
Showing
6 changed files
with
96 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ resource "auth0_email_provider" "sendgrid_email_provider" { | |
# This is an example on how to set up the email provider with Azure CS. | ||
resource "auth0_email_provider" "smtp_email_provider" { | ||
resource "auth0_email_provider" "azure_cs_email_provider" { | ||
name = "azure_cs" | ||
enabled = true | ||
default_from_address = "[email protected]" | ||
|
@@ -63,7 +63,7 @@ resource "auth0_email_provider" "smtp_email_provider" { | |
# This is an example on how to set up the email provider with MS365. | ||
resource "auth0_email_provider" "smtp_email_provider" { | ||
resource "auth0_email_provider" "ms365_email_provider" { | ||
name = "ms365" | ||
enabled = true | ||
default_from_address = "[email protected]" | ||
|
@@ -74,6 +74,44 @@ resource "auth0_email_provider" "smtp_email_provider" { | |
ms365_client_secret = "ms365_client_secret" | ||
} | ||
} | ||
# This is an example on how to set up the email provider with a Custom Action. | ||
resource "auth0_email_provider" "custom_email_provider" { | ||
name = "custom" | ||
enabled = true | ||
credentials { | ||
} | ||
} | ||
resource "auth0_action" "my_action" { | ||
name = "Custom Email Provider" | ||
runtime = "node18" | ||
deploy = true | ||
code = <<-EOT | ||
/** | ||
* Handler to be executed while sending an email notification | ||
* @param {Event} event - Details about the user and the context in which they are logging in. | ||
* @param {CustomEmailProviderAPI} api - Methods and utilities to help change the behavior of sending a email notification. | ||
*/ | ||
exports.onExecuteCustomEmailProvider = async (event, api) => { | ||
// Code goes here | ||
return; | ||
}; | ||
EOT | ||
supported_triggers { | ||
id = "custom-email-provider" | ||
version = "v1" | ||
} | ||
dependencies { | ||
} | ||
secrets { | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
|
@@ -83,7 +121,7 @@ resource "auth0_email_provider" "smtp_email_provider" { | |
|
||
- `credentials` (Block List, Min: 1, Max: 1) Configuration settings for the credentials for the email provider. (see [below for nested schema](#nestedblock--credentials)) | ||
- `default_from_address` (String) Email address to use as the sender when no other "from" address is specified. | ||
- `name` (String) Name of the email provider. Options include `azure_cs`, `mailgun`, `mandrill`, `ms365`, `sendgrid`, `ses`, `smtp` and `sparkpost`. | ||
- `name` (String) Name of the email provider. Options include `azure_cs`, `custom`, `mailgun`, `mandrill`, `ms365`, `sendgrid`, `ses`, `smtp` and `sparkpost`. | ||
|
||
### Optional | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters