UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

343 lines (342 loc) 11.7 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Creates and manages Scaleway Transactional Email Domains. * For more information refer to the [API documentation](https://www.scaleway.com/en/developers/api/transactional-email). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.tem.Domain("main", { * acceptTos: true, * name: "example.com", * }); * ``` * * ### Add the required records to your DNS zone * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const config = new pulumi.Config(); * const domainName = config.require("domainName"); * const main = new scaleway.tem.Domain("main", { * name: domainName, * acceptTos: true, * }); * const spf = new scaleway.domain.Record("spf", { * dnsZone: domainName, * type: "TXT", * data: pulumi.interpolate`v=spf1 ${main.spfConfig} -all`, * }); * const dkim = new scaleway.domain.Record("dkim", { * dnsZone: domainName, * name: pulumi.interpolate`${main.projectId}._domainkey`, * type: "TXT", * data: main.dkimConfig, * }); * const mx = new scaleway.domain.Record("mx", { * dnsZone: domainName, * type: "MX", * data: ".", * }); * const dmarc = new scaleway.domain.Record("dmarc", { * dnsZone: domainName, * name: main.dmarcName, * type: "TXT", * data: main.dmarcConfig, * }); * ``` * * ### Automatically Configure DNS Settings for Your Domain * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const config = new pulumi.Config(); * const domainName = config.require("domainName"); * const main = new scaleway.tem.Domain("main", { * name: domainName, * acceptTos: true, * autoconfig: true, * }); * ``` * * ## Import * * Domains can be imported using the `{region}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:tem/domain:Domain main fr-par/11111111-1111-1111-1111-111111111111 * ``` */ export declare class Domain extends pulumi.CustomResource { /** * Get an existing Domain resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DomainState, opts?: pulumi.CustomResourceOptions): Domain; /** * Returns true if the given object is an instance of Domain. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Domain; /** * Acceptation of the [Term of Service](https://tem.s3.fr-par.scw.cloud/antispam_policy.pdf). * > **Important:** This attribute must be set to `true`. */ readonly acceptTos: pulumi.Output<boolean>; /** * Automatically configures DNS settings for the domain, simplifying the setup process by applying predefined configurations. */ readonly autoconfig: pulumi.Output<boolean | undefined>; /** * The date and time of the Transaction Email Domain's creation (RFC 3339 format). */ readonly createdAt: pulumi.Output<string>; /** * The DKIM public key, as should be recorded in the DNS zone. */ readonly dkimConfig: pulumi.Output<string>; /** * DMARC record for the domain, as should be recorded in the DNS zone. */ readonly dmarcConfig: pulumi.Output<string>; /** * DMARC name for the domain, as should be recorded in the DNS zone. */ readonly dmarcName: pulumi.Output<string>; /** * (Deprecated) The error message if the last check failed. * * @deprecated last_error is deprecated */ readonly lastError: pulumi.Output<string>; /** * The date and time the domain was last found to be valid (RFC 3339 format). */ readonly lastValidAt: pulumi.Output<string>; /** * The Scaleway's blackhole MX server to use if you do not have one. */ readonly mxBlackhole: pulumi.Output<string>; /** * The domain name, must not be used in another Transactional Email Domain. * > **Important:** Updates to `name` will recreate the domain. */ readonly name: pulumi.Output<string>; /** * The date and time of the next scheduled check (RFC 3339 format). */ readonly nextCheckAt: pulumi.Output<string>; /** * `projectId`) The ID of the project the domain is associated with. */ readonly projectId: pulumi.Output<string>; /** * `region`). The region in which the domain should be created. * > **Important:** Currently, only fr-par is supported. Specifying any other region will cause an error. */ readonly region: pulumi.Output<string>; /** * The domain's reputation. */ readonly reputations: pulumi.Output<outputs.tem.DomainReputation[]>; /** * The date and time of the revocation of the domain (RFC 3339 format). */ readonly revokedAt: pulumi.Output<string>; /** * The SMTP host to use to send emails. */ readonly smtpHost: pulumi.Output<string>; /** * The SMTP port to use to send emails over TLS. */ readonly smtpPort: pulumi.Output<number>; /** * The SMTP port to use to send emails over TLS. */ readonly smtpPortAlternative: pulumi.Output<number>; /** * The SMTP port to use to send emails. */ readonly smtpPortUnsecure: pulumi.Output<number>; /** * SMTPS auth user refers to the identifier for a user authorized to send emails via SMTPS, ensuring secure email transmission. */ readonly smtpsAuthUser: pulumi.Output<string>; /** * The SMTPS port to use to send emails over TLS Wrapper. */ readonly smtpsPort: pulumi.Output<number>; /** * The SMTPS port to use to send emails over TLS Wrapper. */ readonly smtpsPortAlternative: pulumi.Output<number>; /** * The snippet of the SPF record that should be registered in the DNS zone. */ readonly spfConfig: pulumi.Output<string>; /** * The status of the domain's reputation. */ readonly status: pulumi.Output<string>; /** * Create a Domain resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DomainArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Domain resources. */ export interface DomainState { /** * Acceptation of the [Term of Service](https://tem.s3.fr-par.scw.cloud/antispam_policy.pdf). * > **Important:** This attribute must be set to `true`. */ acceptTos?: pulumi.Input<boolean>; /** * Automatically configures DNS settings for the domain, simplifying the setup process by applying predefined configurations. */ autoconfig?: pulumi.Input<boolean>; /** * The date and time of the Transaction Email Domain's creation (RFC 3339 format). */ createdAt?: pulumi.Input<string>; /** * The DKIM public key, as should be recorded in the DNS zone. */ dkimConfig?: pulumi.Input<string>; /** * DMARC record for the domain, as should be recorded in the DNS zone. */ dmarcConfig?: pulumi.Input<string>; /** * DMARC name for the domain, as should be recorded in the DNS zone. */ dmarcName?: pulumi.Input<string>; /** * (Deprecated) The error message if the last check failed. * * @deprecated last_error is deprecated */ lastError?: pulumi.Input<string>; /** * The date and time the domain was last found to be valid (RFC 3339 format). */ lastValidAt?: pulumi.Input<string>; /** * The Scaleway's blackhole MX server to use if you do not have one. */ mxBlackhole?: pulumi.Input<string>; /** * The domain name, must not be used in another Transactional Email Domain. * > **Important:** Updates to `name` will recreate the domain. */ name?: pulumi.Input<string>; /** * The date and time of the next scheduled check (RFC 3339 format). */ nextCheckAt?: pulumi.Input<string>; /** * `projectId`) The ID of the project the domain is associated with. */ projectId?: pulumi.Input<string>; /** * `region`). The region in which the domain should be created. * > **Important:** Currently, only fr-par is supported. Specifying any other region will cause an error. */ region?: pulumi.Input<string>; /** * The domain's reputation. */ reputations?: pulumi.Input<pulumi.Input<inputs.tem.DomainReputation>[]>; /** * The date and time of the revocation of the domain (RFC 3339 format). */ revokedAt?: pulumi.Input<string>; /** * The SMTP host to use to send emails. */ smtpHost?: pulumi.Input<string>; /** * The SMTP port to use to send emails over TLS. */ smtpPort?: pulumi.Input<number>; /** * The SMTP port to use to send emails over TLS. */ smtpPortAlternative?: pulumi.Input<number>; /** * The SMTP port to use to send emails. */ smtpPortUnsecure?: pulumi.Input<number>; /** * SMTPS auth user refers to the identifier for a user authorized to send emails via SMTPS, ensuring secure email transmission. */ smtpsAuthUser?: pulumi.Input<string>; /** * The SMTPS port to use to send emails over TLS Wrapper. */ smtpsPort?: pulumi.Input<number>; /** * The SMTPS port to use to send emails over TLS Wrapper. */ smtpsPortAlternative?: pulumi.Input<number>; /** * The snippet of the SPF record that should be registered in the DNS zone. */ spfConfig?: pulumi.Input<string>; /** * The status of the domain's reputation. */ status?: pulumi.Input<string>; } /** * The set of arguments for constructing a Domain resource. */ export interface DomainArgs { /** * Acceptation of the [Term of Service](https://tem.s3.fr-par.scw.cloud/antispam_policy.pdf). * > **Important:** This attribute must be set to `true`. */ acceptTos: pulumi.Input<boolean>; /** * Automatically configures DNS settings for the domain, simplifying the setup process by applying predefined configurations. */ autoconfig?: pulumi.Input<boolean>; /** * The domain name, must not be used in another Transactional Email Domain. * > **Important:** Updates to `name` will recreate the domain. */ name?: pulumi.Input<string>; /** * `projectId`) The ID of the project the domain is associated with. */ projectId?: pulumi.Input<string>; /** * `region`). The region in which the domain should be created. * > **Important:** Currently, only fr-par is supported. Specifying any other region will cause an error. */ region?: pulumi.Input<string>; }