UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

182 lines 8.26 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.TemDomain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * 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:index/temDomain:TemDomain main fr-par/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/temdomain.TemDomain has been deprecated in favor of scaleway.tem/domain.Domain */ class TemDomain extends pulumi.CustomResource { /** * Get an existing TemDomain 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, id, state, opts) { pulumi.log.warn("TemDomain is deprecated: scaleway.index/temdomain.TemDomain has been deprecated in favor of scaleway.tem/domain.Domain"); return new TemDomain(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of TemDomain. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === TemDomain.__pulumiType; } /** @deprecated scaleway.index/temdomain.TemDomain has been deprecated in favor of scaleway.tem/domain.Domain */ constructor(name, argsOrState, opts) { pulumi.log.warn("TemDomain is deprecated: scaleway.index/temdomain.TemDomain has been deprecated in favor of scaleway.tem/domain.Domain"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["acceptTos"] = state ? state.acceptTos : undefined; resourceInputs["autoconfig"] = state ? state.autoconfig : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["dkimConfig"] = state ? state.dkimConfig : undefined; resourceInputs["dmarcConfig"] = state ? state.dmarcConfig : undefined; resourceInputs["dmarcName"] = state ? state.dmarcName : undefined; resourceInputs["lastError"] = state ? state.lastError : undefined; resourceInputs["lastValidAt"] = state ? state.lastValidAt : undefined; resourceInputs["mxBlackhole"] = state ? state.mxBlackhole : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["nextCheckAt"] = state ? state.nextCheckAt : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["reputations"] = state ? state.reputations : undefined; resourceInputs["revokedAt"] = state ? state.revokedAt : undefined; resourceInputs["smtpHost"] = state ? state.smtpHost : undefined; resourceInputs["smtpPort"] = state ? state.smtpPort : undefined; resourceInputs["smtpPortAlternative"] = state ? state.smtpPortAlternative : undefined; resourceInputs["smtpPortUnsecure"] = state ? state.smtpPortUnsecure : undefined; resourceInputs["smtpsAuthUser"] = state ? state.smtpsAuthUser : undefined; resourceInputs["smtpsPort"] = state ? state.smtpsPort : undefined; resourceInputs["smtpsPortAlternative"] = state ? state.smtpsPortAlternative : undefined; resourceInputs["spfConfig"] = state ? state.spfConfig : undefined; resourceInputs["status"] = state ? state.status : undefined; } else { const args = argsOrState; if ((!args || args.acceptTos === undefined) && !opts.urn) { throw new Error("Missing required property 'acceptTos'"); } resourceInputs["acceptTos"] = args ? args.acceptTos : undefined; resourceInputs["autoconfig"] = args ? args.autoconfig : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["dkimConfig"] = undefined /*out*/; resourceInputs["dmarcConfig"] = undefined /*out*/; resourceInputs["dmarcName"] = undefined /*out*/; resourceInputs["lastError"] = undefined /*out*/; resourceInputs["lastValidAt"] = undefined /*out*/; resourceInputs["mxBlackhole"] = undefined /*out*/; resourceInputs["nextCheckAt"] = undefined /*out*/; resourceInputs["reputations"] = undefined /*out*/; resourceInputs["revokedAt"] = undefined /*out*/; resourceInputs["smtpHost"] = undefined /*out*/; resourceInputs["smtpPort"] = undefined /*out*/; resourceInputs["smtpPortAlternative"] = undefined /*out*/; resourceInputs["smtpPortUnsecure"] = undefined /*out*/; resourceInputs["smtpsAuthUser"] = undefined /*out*/; resourceInputs["smtpsPort"] = undefined /*out*/; resourceInputs["smtpsPortAlternative"] = undefined /*out*/; resourceInputs["spfConfig"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(TemDomain.__pulumiType, name, resourceInputs, opts); } } exports.TemDomain = TemDomain; /** @internal */ TemDomain.__pulumiType = 'scaleway:index/temDomain:TemDomain'; //# sourceMappingURL=temDomain.js.map