Resource: auth0_email_provider

With Auth0, you can have standard welcome, password reset, and account verification email-based workflows built right into Auth0. This resource allows you to configure email providers, so you can route all emails that are part of Auth0's authentication workflows through the supported high-volume email service of your choice.

Example Usage

# This is an example on how to set up the email provider with Amazon SES.
resource "auth0_email_provider" "amazon_ses_email_provider" {
  name                 = "ses"
  enabled              = true
  default_from_address = "accounts@example.com"

  credentials {
    access_key_id     = "AKIAXXXXXXXXXXXXXXXX"
    secret_access_key = "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    region            = "us-east-1"
  }
}

# This is an example on how to set up the email provider with SMTP.
resource "auth0_email_provider" "smtp_email_provider" {
  name                 = "smtp"
  enabled              = true
  default_from_address = "accounts@example.com"

  credentials {
    smtp_host = "your.smtp.host.com"
    smtp_port = 583
    smtp_user = "SMTP Username"
    smtp_pass = "SMTP Password"
  }
}

# This is an example on how to set up the email provider with Sendgrid.
resource "auth0_email_provider" "sendgrid_email_provider" {
  name                 = "sendgrid"
  enabled              = true
  default_from_address = "accounts@example.com"

  credentials {
    api_key = "secretAPIKey"
  }
}


# This is an example on how to set up the email provider with Azure CS.
resource "auth0_email_provider" "smtp_email_provider" {
  name                 = "azure_cs"
  enabled              = true
  default_from_address = "accounts@example.com"

  credentials {
    azure_cs_connection_string = "azure_cs_connection_string"
  }
}


# This is an example on how to set up the email provider with MS365.
resource "auth0_email_provider" "smtp_email_provider" {
  name                 = "ms365"
  enabled              = true
  default_from_address = "accounts@example.com"

  credentials {
    ms365_tenant_id     = "ms365_tenant_id"
    ms365_client_id     = "ms365_client_id"
    ms365_client_secret = "ms365_client_secret"
  }
}

Schema

Required

Optional

Read-Only

Nested Schema for credentials

Optional:

Nested Schema for settings

Optional:

Nested Schema for settings.headers

Optional:

Nested Schema for settings.message

Optional:

Import

Import is supported using the following syntax:

# As this is not a resource identifiable by an ID within the Auth0 Management API,
# email can be imported using a random string.
#
# We recommend [Version 4 UUID](https://www.uuidgenerator.net/version4)
#
# Example:
terraform import auth0_email_provider.my_email_provider "b4213dc2-2eed-42c3-9516-c6131a9ce0b0"