published on Thursday, Nov 12, 2026 by Pulumi
published on Thursday, Nov 12, 2026 by Pulumi
Accepted Permissions
Cloud Email Security: ReadCloud 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:
- Account
Id string - Identifier.
- Is
Recent bool - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- Is
Regex bool - Whether
patternis 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
- Account
Id string - Identifier.
- Is
Recent bool - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- Is
Regex bool - Whether
patternis 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
- account_
id string - Identifier.
- is_
recent bool - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- is_
regex bool - Whether
patternis 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
- account
Id String - Identifier.
- is
Recent Boolean - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- is
Regex Boolean - Whether
patternis a regular expression instead of a literal domain. - is
Similarity 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 string - Identifier.
- is
Recent boolean - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- is
Regex boolean - Whether
patternis a regular expression instead of a literal domain. - is
Similarity 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
patternis 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
- account
Id String - Identifier.
- is
Recent Boolean - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- is
Regex Boolean - Whether
patternis a regular expression instead of a literal domain. - is
Similarity 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:
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - Deprecated, use
modifiedAtinstead. End of life: November 1, 2026. - Modified
At string
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - Deprecated, use
modifiedAtinstead. End of life: November 1, 2026. - Modified
At string
- created_
at string - id string
- The provider-assigned unique ID for this managed resource.
- last_
modified string - Deprecated, use
modifiedAtinstead. End of life: November 1, 2026. - modified_
at string
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - Deprecated, use
modifiedAtinstead. End of life: November 1, 2026. - modified
At String
- created
At string - id string
- The provider-assigned unique ID for this managed resource.
- last
Modified string - Deprecated, use
modifiedAtinstead. End of life: November 1, 2026. - modified
At string
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
- last_
modified str - Deprecated, use
modifiedAtinstead. End of life: November 1, 2026. - modified_
at str
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - Deprecated, use
modifiedAtinstead. End of life: November 1, 2026. - modified
At 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) -> EmailSecurityTrustedDomainsfunc 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.
- 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
patternis 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
modifiedAtinstead. End of life: November 1, 2026. - Modified
At 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
patternis 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
modifiedAtinstead. End of life: November 1, 2026. - Modified
At 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
patternis 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
modifiedAtinstead. End of life: November 1, 2026. - modified_
at string - pattern string
- The domain pattern to trust, e.g.
example.com.
- account
Id String - Identifier.
- comments String
- created
At String - is
Recent Boolean - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- is
Regex Boolean - Whether
patternis a regular expression instead of a literal domain. - is
Similarity Boolean - 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
modifiedAtinstead. End of life: November 1, 2026. - modified
At String - pattern String
- The domain pattern to trust, e.g.
example.com.
- account
Id string - Identifier.
- comments string
- created
At string - is
Recent boolean - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- is
Regex boolean - Whether
patternis a regular expression instead of a literal domain. - is
Similarity boolean - 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
modifiedAtinstead. End of life: November 1, 2026. - modified
At 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
patternis 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
modifiedAtinstead. End of life: November 1, 2026. - modified_
at str - pattern str
- The domain pattern to trust, e.g.
example.com.
- account
Id String - Identifier.
- comments String
- created
At String - is
Recent Boolean - Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition.
- is
Regex Boolean - Whether
patternis a regular expression instead of a literal domain. - is
Similarity Boolean - 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
modifiedAtinstead. End of life: November 1, 2026. - modified
At 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
cloudflareTerraform Provider.
published on Thursday, Nov 12, 2026 by Pulumi