Email

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

using Pulumi;
using Auth0 = Pulumi.Auth0;

class MyStack : Stack
{
    public MyStack()
    {
        var myEmailProvider = new Auth0.Email("myEmailProvider", new Auth0.EmailArgs
        {
            Credentials = new Auth0.Inputs.EmailCredentialsArgs
            {
                AccessKeyId = "AKIAXXXXXXXXXXXXXXXX",
                Region = "us-east-1",
                SecretAccessKey = "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            },
            DefaultFromAddress = "accounts@example.com",
            Enabled = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-auth0/sdk/v2/go/auth0"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := auth0.NewEmail(ctx, "myEmailProvider", &auth0.EmailArgs{
			Credentials: &auth0.EmailCredentialsArgs{
				AccessKeyId:     pulumi.String("AKIAXXXXXXXXXXXXXXXX"),
				Region:          pulumi.String("us-east-1"),
				SecretAccessKey: pulumi.String("7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
			},
			DefaultFromAddress: pulumi.String("accounts@example.com"),
			Enabled:            pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_auth0 as auth0

my_email_provider = auth0.Email("myEmailProvider",
    credentials=auth0.EmailCredentialsArgs(
        access_key_id="AKIAXXXXXXXXXXXXXXXX",
        region="us-east-1",
        secret_access_key="7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    ),
    default_from_address="accounts@example.com",
    enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";

const myEmailProvider = new auth0.Email("my_email_provider", {
    credentials: {
        accessKeyId: "AKIAXXXXXXXXXXXXXXXX",
        region: "us-east-1",
        secretAccessKey: "7e8c2148xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    },
    defaultFromAddress: "accounts@example.com",
    enabled: true,
});

Create a Email Resource

new Email(name: string, args: EmailArgs, opts?: CustomResourceOptions);
@overload
def Email(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          credentials: Optional[EmailCredentialsArgs] = None,
          default_from_address: Optional[str] = None,
          enabled: Optional[bool] = None,
          name: Optional[str] = None)
@overload
def Email(resource_name: str,
          args: EmailArgs,
          opts: Optional[ResourceOptions] = None)
func NewEmail(ctx *Context, name string, args EmailArgs, opts ...ResourceOption) (*Email, error)
public Email(string name, EmailArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args EmailArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EmailArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EmailArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EmailArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Email Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Email resource accepts the following input properties:

Credentials EmailCredentialsArgs
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
DefaultFromAddress string
String. Email address to use as the sender when no other “from” address is specified.
Enabled bool
Boolean. Indicates whether or not the email provider is enabled.
Name string
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.
Credentials EmailCredentials
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
DefaultFromAddress string
String. Email address to use as the sender when no other “from” address is specified.
Enabled bool
Boolean. Indicates whether or not the email provider is enabled.
Name string
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.
credentials EmailCredentialsArgs
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
defaultFromAddress string
String. Email address to use as the sender when no other “from” address is specified.
enabled boolean
Boolean. Indicates whether or not the email provider is enabled.
name string
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.
credentials EmailCredentialsArgs
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
default_from_address str
String. Email address to use as the sender when no other “from” address is specified.
enabled bool
Boolean. Indicates whether or not the email provider is enabled.
name str
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.

Outputs

All input properties are implicitly available as output properties. Additionally, the Email resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Email Resource

Get an existing Email resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EmailState, opts?: CustomResourceOptions): Email
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        credentials: Optional[EmailCredentialsArgs] = None,
        default_from_address: Optional[str] = None,
        enabled: Optional[bool] = None,
        name: Optional[str] = None) -> Email
func GetEmail(ctx *Context, name string, id IDInput, state *EmailState, opts ...ResourceOption) (*Email, error)
public static Email Get(string name, Input<string> id, EmailState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Credentials EmailCredentialsArgs
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
DefaultFromAddress string
String. Email address to use as the sender when no other “from” address is specified.
Enabled bool
Boolean. Indicates whether or not the email provider is enabled.
Name string
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.
Credentials EmailCredentials
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
DefaultFromAddress string
String. Email address to use as the sender when no other “from” address is specified.
Enabled bool
Boolean. Indicates whether or not the email provider is enabled.
Name string
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.
credentials EmailCredentialsArgs
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
defaultFromAddress string
String. Email address to use as the sender when no other “from” address is specified.
enabled boolean
Boolean. Indicates whether or not the email provider is enabled.
name string
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.
credentials EmailCredentialsArgs
List(Resource). Configuration settings for the credentials for the email provider. For details, see Credentials.
default_from_address str
String. Email address to use as the sender when no other “from” address is specified.
enabled bool
Boolean. Indicates whether or not the email provider is enabled.
name str
String. Name of the email provider. Options include mailgun, mandrill, sendgrid, ses, smtp, and sparkpost.

Supporting Types

EmailCredentials

AccessKeyId string
String, Case-sensitive. AWS Access Key ID. Used only for AWS.
ApiKey string
String, Case-sensitive. API Key for your email service. Will always be encrypted in our database.
ApiUser string
String. API User for your email service.
Domain string
Region string
String. Default region. Used only for AWS, Mailgun, and SparkPost.
SecretAccessKey string
String, Case-sensitive. AWS Secret Key. Will always be encrypted in our database. Used only for AWS.
SmtpHost string
String. Hostname or IP address of your SMTP server. Used only for SMTP.
SmtpPass string
String, Case-sensitive. SMTP password. Used only for SMTP.
SmtpPort int
Integer. Port used by your SMTP server. Please avoid using port 25 if possible because many providers have limitations on this port. Used only for SMTP.
SmtpUser string
String. SMTP username. Used only for SMTP.
AccessKeyId string
String, Case-sensitive. AWS Access Key ID. Used only for AWS.
ApiKey string
String, Case-sensitive. API Key for your email service. Will always be encrypted in our database.
ApiUser string
String. API User for your email service.
Domain string
Region string
String. Default region. Used only for AWS, Mailgun, and SparkPost.
SecretAccessKey string
String, Case-sensitive. AWS Secret Key. Will always be encrypted in our database. Used only for AWS.
SmtpHost string
String. Hostname or IP address of your SMTP server. Used only for SMTP.
SmtpPass string
String, Case-sensitive. SMTP password. Used only for SMTP.
SmtpPort int
Integer. Port used by your SMTP server. Please avoid using port 25 if possible because many providers have limitations on this port. Used only for SMTP.
SmtpUser string
String. SMTP username. Used only for SMTP.
accessKeyId string
String, Case-sensitive. AWS Access Key ID. Used only for AWS.
apiKey string
String, Case-sensitive. API Key for your email service. Will always be encrypted in our database.
apiUser string
String. API User for your email service.
domain string
region string
String. Default region. Used only for AWS, Mailgun, and SparkPost.
secretAccessKey string
String, Case-sensitive. AWS Secret Key. Will always be encrypted in our database. Used only for AWS.
smtpHost string
String. Hostname or IP address of your SMTP server. Used only for SMTP.
smtpPass string
String, Case-sensitive. SMTP password. Used only for SMTP.
smtpPort number
Integer. Port used by your SMTP server. Please avoid using port 25 if possible because many providers have limitations on this port. Used only for SMTP.
smtpUser string
String. SMTP username. Used only for SMTP.
access_key_id str
String, Case-sensitive. AWS Access Key ID. Used only for AWS.
api_key str
String, Case-sensitive. API Key for your email service. Will always be encrypted in our database.
api_user str
String. API User for your email service.
domain str
region str
String. Default region. Used only for AWS, Mailgun, and SparkPost.
secret_access_key str
String, Case-sensitive. AWS Secret Key. Will always be encrypted in our database. Used only for AWS.
smtp_host str
String. Hostname or IP address of your SMTP server. Used only for SMTP.
smtp_pass str
String, Case-sensitive. SMTP password. Used only for SMTP.
smtp_port int
Integer. Port used by your SMTP server. Please avoid using port 25 if possible because many providers have limitations on this port. Used only for SMTP.
smtp_user str
String. SMTP username. Used only for SMTP.

Package Details

Repository
https://github.com/pulumi/pulumi-auth0
License
Apache-2.0
Notes
This Pulumi package is based on the auth0 Terraform Provider.