1. Registry
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. EmailSecurityTrustedDomains
Viewing docs for Cloudflare v6.24.0
published on Thursday, Nov 12, 2026 by Pulumi
cloudflare logo cloudflare logo
Viewing docs for Cloudflare v6.24.0
published on Thursday, Nov 12, 2026 by Pulumi

    Accepted Permissions

    • Cloud Email Security: Read
    • Cloud Email Security: Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleEmailSecurityTrustedDomains = new cloudflare.EmailSecurityTrustedDomains("example_email_security_trusted_domains", {
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        isRecent: true,
        isRegex: false,
        isSimilarity: false,
        pattern: "example.com",
        comments: "Trusted partner domain",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_email_security_trusted_domains = cloudflare.EmailSecurityTrustedDomains("example_email_security_trusted_domains",
        account_id="023e105f4ecef8ad9ca31a8372d0c353",
        is_recent=True,
        is_regex=False,
        is_similarity=False,
        pattern="example.com",
        comments="Trusted partner domain")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewEmailSecurityTrustedDomains(ctx, "example_email_security_trusted_domains", &cloudflare.EmailSecurityTrustedDomainsArgs{
    			AccountId:    pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    			IsRecent:     pulumi.Bool(true),
    			IsRegex:      pulumi.Bool(false),
    			IsSimilarity: pulumi.Bool(false),
    			Pattern:      pulumi.String("example.com"),
    			Comments:     pulumi.String("Trusted partner domain"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleEmailSecurityTrustedDomains = new Cloudflare.EmailSecurityTrustedDomains("example_email_security_trusted_domains", new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            IsRecent = true,
            IsRegex = false,
            IsSimilarity = false,
            Pattern = "example.com",
            Comments = "Trusted partner domain",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.EmailSecurityTrustedDomains;
    import com.pulumi.cloudflare.EmailSecurityTrustedDomainsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 exampleEmailSecurityTrustedDomains = new EmailSecurityTrustedDomains("exampleEmailSecurityTrustedDomains", EmailSecurityTrustedDomainsArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .isRecent(true)
                .isRegex(false)
                .isSimilarity(false)
                .pattern("example.com")
                .comments("Trusted partner domain")
                .build());
    
        }
    }
    
    resources:
      exampleEmailSecurityTrustedDomains:
        type: cloudflare:EmailSecurityTrustedDomains
        name: example_email_security_trusted_domains
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          isRecent: true
          isRegex: false
          isSimilarity: false
          pattern: example.com
          comments: Trusted partner domain
    
    terraform {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    resource "cloudflare_email_security_trusted_domains" "example_email_security_trusted_domains" {
      lifecycle {
        create_before_destroy = true
      }
      account_id    = "023e105f4ecef8ad9ca31a8372d0c353"
      is_recent     = true
      is_regex      = false
      is_similarity = false
      pattern       = "example.com"
      comments      = "Trusted partner domain"
    }
    

    Create EmailSecurityTrustedDomains Resource

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

    Constructor syntax

    new EmailSecurityTrustedDomains(name: string, args: EmailSecurityTrustedDomainsArgs, opts?: CustomResourceOptions);
    @overload
    def EmailSecurityTrustedDomains(resource_name: str,
                                    args: EmailSecurityTrustedDomainsArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def EmailSecurityTrustedDomains(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    account_id: Optional[str] = None,
                                    is_recent: Optional[bool] = None,
                                    is_regex: Optional[bool] = None,
                                    is_similarity: Optional[bool] = None,
                                    pattern: Optional[str] = None,
                                    comments: Optional[str] = None)
    func NewEmailSecurityTrustedDomains(ctx *Context, name string, args EmailSecurityTrustedDomainsArgs, opts ...ResourceOption) (*EmailSecurityTrustedDomains, error)
    public EmailSecurityTrustedDomains(string name, EmailSecurityTrustedDomainsArgs args, CustomResourceOptions? opts = null)
    public EmailSecurityTrustedDomains(String name, EmailSecurityTrustedDomainsArgs args)
    public EmailSecurityTrustedDomains(String name, EmailSecurityTrustedDomainsArgs args, CustomResourceOptions options)
    
    type: cloudflare:EmailSecurityTrustedDomains
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "cloudflare_email_security_trusted_domains" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args EmailSecurityTrustedDomainsArgs
    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 EmailSecurityTrustedDomainsArgs
    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 EmailSecurityTrustedDomainsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EmailSecurityTrustedDomainsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EmailSecurityTrustedDomainsArgs
    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 emailSecurityTrustedDomainsResource = new Cloudflare.EmailSecurityTrustedDomains("emailSecurityTrustedDomainsResource", new()
    {
        AccountId = "string",
        IsRecent = false,
        IsRegex = false,
        IsSimilarity = false,
        Pattern = "string",
        Comments = "string",
    });
    
    example, err := cloudflare.NewEmailSecurityTrustedDomains(ctx, "emailSecurityTrustedDomainsResource", &cloudflare.EmailSecurityTrustedDomainsArgs{
    	AccountId:    pulumi.String("string"),
    	IsRecent:     pulumi.Bool(false),
    	IsRegex:      pulumi.Bool(false),
    	IsSimilarity: pulumi.Bool(false),
    	Pattern:      pulumi.String("string"),
    	Comments:     pulumi.String("string"),
    })
    
    resource "cloudflare_email_security_trusted_domains" "emailSecurityTrustedDomainsResource" {
      lifecycle {
        create_before_destroy = true
      }
      account_id    = "string"
      is_recent     = false
      is_regex      = false
      is_similarity = false
      pattern       = "string"
      comments      = "string"
    }
    
    var emailSecurityTrustedDomainsResource = new EmailSecurityTrustedDomains("emailSecurityTrustedDomainsResource", EmailSecurityTrustedDomainsArgs.builder()
        .accountId("string")
        .isRecent(false)
        .isRegex(false)
        .isSimilarity(false)
        .pattern("string")
        .comments("string")
        .build());
    
    email_security_trusted_domains_resource = cloudflare.EmailSecurityTrustedDomains("emailSecurityTrustedDomainsResource",
        account_id="string",
        is_recent=False,
        is_regex=False,
        is_similarity=False,
        pattern="string",
        comments="string")
    
    const emailSecurityTrustedDomainsResource = new cloudflare.EmailSecurityTrustedDomains("emailSecurityTrustedDomainsResource", {
        accountId: "string",
        isRecent: false,
        isRegex: false,
        isSimilarity: false,
        pattern: "string",
        comments: "string",
    });
    
    type: cloudflare:EmailSecurityTrustedDomains
    properties:
        accountId: string
        comments: string
        isRecent: false
        isRegex: false
        isSimilarity: false
        pattern: string
    

    EmailSecurityTrustedDomains 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 EmailSecurityTrustedDomains resource accepts the following input properties:

    AccountId string
    Identifier.
    IsRecent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    IsRegex bool
    Whether pattern is a regular expression instead of a literal domain.
    IsSimilarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    Pattern string
    The domain pattern to trust, e.g. example.com.
    Comments string
    AccountId string
    Identifier.
    IsRecent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    IsRegex bool
    Whether pattern is a regular expression instead of a literal domain.
    IsSimilarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    Pattern string
    The domain pattern to trust, e.g. example.com.
    Comments string
    account_id string
    Identifier.
    is_recent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    is_regex bool
    Whether pattern is a regular expression instead of a literal domain.
    is_similarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    pattern string
    The domain pattern to trust, e.g. example.com.
    comments string
    accountId String
    Identifier.
    isRecent Boolean
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    isRegex Boolean
    Whether pattern is a regular expression instead of a literal domain.
    isSimilarity Boolean
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    pattern String
    The domain pattern to trust, e.g. example.com.
    comments String
    accountId string
    Identifier.
    isRecent boolean
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    isRegex boolean
    Whether pattern is a regular expression instead of a literal domain.
    isSimilarity boolean
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    pattern string
    The domain pattern to trust, e.g. example.com.
    comments string
    account_id str
    Identifier.
    is_recent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    is_regex bool
    Whether pattern is a regular expression instead of a literal domain.
    is_similarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    pattern str
    The domain pattern to trust, e.g. example.com.
    comments str
    accountId String
    Identifier.
    isRecent Boolean
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    isRegex Boolean
    Whether pattern is a regular expression instead of a literal domain.
    isSimilarity Boolean
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    pattern String
    The domain pattern to trust, e.g. example.com.
    comments String

    Outputs

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

    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    ModifiedAt string
    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    ModifiedAt string
    created_at string
    id string
    The provider-assigned unique ID for this managed resource.
    last_modified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modified_at string
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt String
    createdAt string
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt string
    created_at str
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified str
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modified_at str
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt String

    Look up Existing EmailSecurityTrustedDomains Resource

    Get an existing EmailSecurityTrustedDomains 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?: EmailSecurityTrustedDomainsState, opts?: CustomResourceOptions): EmailSecurityTrustedDomains
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            comments: Optional[str] = None,
            created_at: Optional[str] = None,
            is_recent: Optional[bool] = None,
            is_regex: Optional[bool] = None,
            is_similarity: Optional[bool] = None,
            last_modified: Optional[str] = None,
            modified_at: Optional[str] = None,
            pattern: Optional[str] = None) -> EmailSecurityTrustedDomains
    func GetEmailSecurityTrustedDomains(ctx *Context, name string, id IDInput, state *EmailSecurityTrustedDomainsState, opts ...ResourceOption) (*EmailSecurityTrustedDomains, error)
    public static EmailSecurityTrustedDomains Get(string name, Input<string> id, EmailSecurityTrustedDomainsState? state, CustomResourceOptions? opts = null)
    public static EmailSecurityTrustedDomains get(String name, Output<String> id, EmailSecurityTrustedDomainsState state, CustomResourceOptions options)
    resources:  existingEmailSecurityTrustedDomains:    type: cloudflare:EmailSecurityTrustedDomains    get:      id: ${id}
    import {
      to = cloudflare_email_security_trusted_domains.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state EmailSecurityTrustedDomainsState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state EmailSecurityTrustedDomainsState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state EmailSecurityTrustedDomainsState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state EmailSecurityTrustedDomainsState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    AccountId string
    Identifier.
    Comments string
    CreatedAt string
    IsRecent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    IsRegex bool
    Whether pattern is a regular expression instead of a literal domain.
    IsSimilarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    LastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    ModifiedAt string
    Pattern string
    The domain pattern to trust, e.g. example.com.
    AccountId string
    Identifier.
    Comments string
    CreatedAt string
    IsRecent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    IsRegex bool
    Whether pattern is a regular expression instead of a literal domain.
    IsSimilarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    LastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    ModifiedAt string
    Pattern string
    The domain pattern to trust, e.g. example.com.
    account_id string
    Identifier.
    comments string
    created_at string
    is_recent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    is_regex bool
    Whether pattern is a regular expression instead of a literal domain.
    is_similarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    last_modified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modified_at string
    pattern string
    The domain pattern to trust, e.g. example.com.
    accountId String
    Identifier.
    comments String
    createdAt String
    isRecent Boolean
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    isRegex Boolean
    Whether pattern is a regular expression instead of a literal domain.
    isSimilarity Boolean
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    lastModified String
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt String
    pattern String
    The domain pattern to trust, e.g. example.com.
    accountId string
    Identifier.
    comments string
    createdAt string
    isRecent boolean
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    isRegex boolean
    Whether pattern is a regular expression instead of a literal domain.
    isSimilarity boolean
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    lastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt string
    pattern string
    The domain pattern to trust, e.g. example.com.
    account_id str
    Identifier.
    comments str
    created_at str
    is_recent bool
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    is_regex bool
    Whether pattern is a regular expression instead of a literal domain.
    is_similarity bool
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    last_modified str
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modified_at str
    pattern str
    The domain pattern to trust, e.g. example.com.
    accountId String
    Identifier.
    comments String
    createdAt String
    isRecent Boolean
    Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
    isRegex Boolean
    Whether pattern is a regular expression instead of a literal domain.
    isSimilarity Boolean
    Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition.
    lastModified String
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt String
    pattern String
    The domain pattern to trust, e.g. example.com.

    Import

    $ pulumi import cloudflare:index/emailSecurityTrustedDomains:EmailSecurityTrustedDomains example '<account_id>/<trusted_domain_id>'
    

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

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo cloudflare logo
    Viewing docs for Cloudflare v6.24.0
    published on Thursday, Nov 12, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial