1. Packages
  2. Zitadel
  3. API Docs
  4. SmtpConfig
zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse

zitadel.SmtpConfig

Explore with Pulumi AI

Resource representing the SMTP configuration of an instance.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumiverse.Zitadel;

return await Deployment.RunAsync(() => 
{
    var @default = new Zitadel.SmtpConfig("default", new()
    {
        SenderAddress = "sender@example.com",
        SenderName = "no-reply",
        Tls = true,
        Host = "localhost:25",
        User = "user",
        Password = "secret_password",
        ReplyToAddress = "replyto@example.com",
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zitadel.NewSmtpConfig(ctx, "default", &zitadel.SmtpConfigArgs{
			SenderAddress:  pulumi.String("sender@example.com"),
			SenderName:     pulumi.String("no-reply"),
			Tls:            pulumi.Bool(true),
			Host:           pulumi.String("localhost:25"),
			User:           pulumi.String("user"),
			Password:       pulumi.String("secret_password"),
			ReplyToAddress: pulumi.String("replyto@example.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zitadel.SmtpConfig;
import com.pulumi.zitadel.SmtpConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new SmtpConfig("default", SmtpConfigArgs.builder()        
            .senderAddress("sender@example.com")
            .senderName("no-reply")
            .tls(true)
            .host("localhost:25")
            .user("user")
            .password("secret_password")
            .replyToAddress("replyto@example.com")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";

const _default = new zitadel.SmtpConfig("default", {
    senderAddress: "sender@example.com",
    senderName: "no-reply",
    tls: true,
    host: "localhost:25",
    user: "user",
    password: "secret_password",
    replyToAddress: "replyto@example.com",
});
Copy
import pulumi
import pulumiverse_zitadel as zitadel

default = zitadel.SmtpConfig("default",
    sender_address="sender@example.com",
    sender_name="no-reply",
    tls=True,
    host="localhost:25",
    user="user",
    password="secret_password",
    reply_to_address="replyto@example.com")
Copy
resources:
  default:
    type: zitadel:SmtpConfig
    properties:
      senderAddress: sender@example.com
      senderName: no-reply
      tls: true
      host: localhost:25
      user: user
      password: secret_password
      replyToAddress: replyto@example.com
Copy

Create SmtpConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SmtpConfig(name: string, args: SmtpConfigArgs, opts?: CustomResourceOptions);
@overload
def SmtpConfig(resource_name: str,
               args: SmtpConfigArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def SmtpConfig(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               host: Optional[str] = None,
               sender_address: Optional[str] = None,
               sender_name: Optional[str] = None,
               password: Optional[str] = None,
               reply_to_address: Optional[str] = None,
               tls: Optional[bool] = None,
               user: Optional[str] = None)
func NewSmtpConfig(ctx *Context, name string, args SmtpConfigArgs, opts ...ResourceOption) (*SmtpConfig, error)
public SmtpConfig(string name, SmtpConfigArgs args, CustomResourceOptions? opts = null)
public SmtpConfig(String name, SmtpConfigArgs args)
public SmtpConfig(String name, SmtpConfigArgs args, CustomResourceOptions options)
type: zitadel:SmtpConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SmtpConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SmtpConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SmtpConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SmtpConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SmtpConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var smtpConfigResource = new Zitadel.SmtpConfig("smtpConfigResource", new()
{
    Host = "string",
    SenderAddress = "string",
    SenderName = "string",
    Password = "string",
    ReplyToAddress = "string",
    Tls = false,
    User = "string",
});
Copy
example, err := zitadel.NewSmtpConfig(ctx, "smtpConfigResource", &zitadel.SmtpConfigArgs{
	Host:           pulumi.String("string"),
	SenderAddress:  pulumi.String("string"),
	SenderName:     pulumi.String("string"),
	Password:       pulumi.String("string"),
	ReplyToAddress: pulumi.String("string"),
	Tls:            pulumi.Bool(false),
	User:           pulumi.String("string"),
})
Copy
var smtpConfigResource = new SmtpConfig("smtpConfigResource", SmtpConfigArgs.builder()
    .host("string")
    .senderAddress("string")
    .senderName("string")
    .password("string")
    .replyToAddress("string")
    .tls(false)
    .user("string")
    .build());
Copy
smtp_config_resource = zitadel.SmtpConfig("smtpConfigResource",
    host="string",
    sender_address="string",
    sender_name="string",
    password="string",
    reply_to_address="string",
    tls=False,
    user="string")
Copy
const smtpConfigResource = new zitadel.SmtpConfig("smtpConfigResource", {
    host: "string",
    senderAddress: "string",
    senderName: "string",
    password: "string",
    replyToAddress: "string",
    tls: false,
    user: "string",
});
Copy
type: zitadel:SmtpConfig
properties:
    host: string
    password: string
    replyToAddress: string
    senderAddress: string
    senderName: string
    tls: false
    user: string
Copy

SmtpConfig Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SmtpConfig resource accepts the following input properties:

Host This property is required. string
Host and port address to your SMTP server.
SenderAddress This property is required. string
Address used to send emails.
SenderName This property is required. string
Sender name used to send emails.
Password string
Password used to communicate with your SMTP server.
ReplyToAddress string
Address to reply to.
Tls bool
TLS used to communicate with your SMTP server.
User string
User used to communicate with your SMTP server.
Host This property is required. string
Host and port address to your SMTP server.
SenderAddress This property is required. string
Address used to send emails.
SenderName This property is required. string
Sender name used to send emails.
Password string
Password used to communicate with your SMTP server.
ReplyToAddress string
Address to reply to.
Tls bool
TLS used to communicate with your SMTP server.
User string
User used to communicate with your SMTP server.
host This property is required. String
Host and port address to your SMTP server.
senderAddress This property is required. String
Address used to send emails.
senderName This property is required. String
Sender name used to send emails.
password String
Password used to communicate with your SMTP server.
replyToAddress String
Address to reply to.
tls Boolean
TLS used to communicate with your SMTP server.
user String
User used to communicate with your SMTP server.
host This property is required. string
Host and port address to your SMTP server.
senderAddress This property is required. string
Address used to send emails.
senderName This property is required. string
Sender name used to send emails.
password string
Password used to communicate with your SMTP server.
replyToAddress string
Address to reply to.
tls boolean
TLS used to communicate with your SMTP server.
user string
User used to communicate with your SMTP server.
host This property is required. str
Host and port address to your SMTP server.
sender_address This property is required. str
Address used to send emails.
sender_name This property is required. str
Sender name used to send emails.
password str
Password used to communicate with your SMTP server.
reply_to_address str
Address to reply to.
tls bool
TLS used to communicate with your SMTP server.
user str
User used to communicate with your SMTP server.
host This property is required. String
Host and port address to your SMTP server.
senderAddress This property is required. String
Address used to send emails.
senderName This property is required. String
Sender name used to send emails.
password String
Password used to communicate with your SMTP server.
replyToAddress String
Address to reply to.
tls Boolean
TLS used to communicate with your SMTP server.
user String
User used to communicate with your SMTP server.

Outputs

All input properties are implicitly available as output properties. Additionally, the SmtpConfig 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 string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing SmtpConfig Resource

Get an existing SmtpConfig 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?: SmtpConfigState, opts?: CustomResourceOptions): SmtpConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        host: Optional[str] = None,
        password: Optional[str] = None,
        reply_to_address: Optional[str] = None,
        sender_address: Optional[str] = None,
        sender_name: Optional[str] = None,
        tls: Optional[bool] = None,
        user: Optional[str] = None) -> SmtpConfig
func GetSmtpConfig(ctx *Context, name string, id IDInput, state *SmtpConfigState, opts ...ResourceOption) (*SmtpConfig, error)
public static SmtpConfig Get(string name, Input<string> id, SmtpConfigState? state, CustomResourceOptions? opts = null)
public static SmtpConfig get(String name, Output<String> id, SmtpConfigState state, CustomResourceOptions options)
resources:  _:    type: zitadel:SmtpConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Host string
Host and port address to your SMTP server.
Password string
Password used to communicate with your SMTP server.
ReplyToAddress string
Address to reply to.
SenderAddress string
Address used to send emails.
SenderName string
Sender name used to send emails.
Tls bool
TLS used to communicate with your SMTP server.
User string
User used to communicate with your SMTP server.
Host string
Host and port address to your SMTP server.
Password string
Password used to communicate with your SMTP server.
ReplyToAddress string
Address to reply to.
SenderAddress string
Address used to send emails.
SenderName string
Sender name used to send emails.
Tls bool
TLS used to communicate with your SMTP server.
User string
User used to communicate with your SMTP server.
host String
Host and port address to your SMTP server.
password String
Password used to communicate with your SMTP server.
replyToAddress String
Address to reply to.
senderAddress String
Address used to send emails.
senderName String
Sender name used to send emails.
tls Boolean
TLS used to communicate with your SMTP server.
user String
User used to communicate with your SMTP server.
host string
Host and port address to your SMTP server.
password string
Password used to communicate with your SMTP server.
replyToAddress string
Address to reply to.
senderAddress string
Address used to send emails.
senderName string
Sender name used to send emails.
tls boolean
TLS used to communicate with your SMTP server.
user string
User used to communicate with your SMTP server.
host str
Host and port address to your SMTP server.
password str
Password used to communicate with your SMTP server.
reply_to_address str
Address to reply to.
sender_address str
Address used to send emails.
sender_name str
Sender name used to send emails.
tls bool
TLS used to communicate with your SMTP server.
user str
User used to communicate with your SMTP server.
host String
Host and port address to your SMTP server.
password String
Password used to communicate with your SMTP server.
replyToAddress String
Address to reply to.
senderAddress String
Address used to send emails.
senderName String
Sender name used to send emails.
tls Boolean
TLS used to communicate with your SMTP server.
user String
User used to communicate with your SMTP server.

Import

bash The resource can be imported using the ID format <[password]>, e.g.

 $ pulumi import zitadel:index/smtpConfig:SmtpConfig imported 'p4ssw0rd'
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
zitadel pulumiverse/pulumi-zitadel
License
Apache-2.0
Notes
This Pulumi package is based on the zitadel Terraform Provider.