@pulumi/dnsimple
Version:
A Pulumi package for creating and managing dnsimple cloud resources.
293 lines • 13.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Provides a DNSimple registered domain resource.
*
* ## Example Usage
*
* The simplest example below requires a contact (existing or a new one to be created) and basic domain information.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dnsimple from "@pulumi/dnsimple";
*
* const aliceMain = new dnsimple.Contact("alice_main", {
* label: "Alice",
* firstName: "Alice",
* lastName: "Appleseed",
* organizationName: "Contoso",
* jobTitle: "Manager",
* address1: "Level 1, 2 Main St",
* city: "San Francisco",
* stateProvince: "California",
* postalCode: "90210",
* country: "US",
* phone: "+1.401239523",
* email: "apple@contoso.com",
* });
* const exampleCom = new dnsimple.RegisteredDomain("example_com", {
* name: "example.com",
* contactId: aliceMain.id.apply(x =>Number(x)),
* });
* ```
*
* ### Example with more settings
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dnsimple from "@pulumi/dnsimple";
*
* const exampleCom = new dnsimple.RegisteredDomain("example_com", {
* name: "example.com",
* contactId: Number(aliceMain.id),
* autoRenewEnabled: true,
* transferLockEnabled: true,
* whoisPrivacyEnabled: true,
* dnssecEnabled: false,
* trustee: false,
* });
* ```
*
* ### Example with extended attributes
*
* Some domain extensions require additional information during registration. You can check if a domain extension requires extended attributes using the [TLD Extended Attributes API](https://developer.dnsimple.com/v2/tlds/#getTldExtendedAttributes).
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dnsimple from "@pulumi/dnsimple";
*
* const exampleBio = new dnsimple.RegisteredDomain("example_bio", {
* name: "example.bio",
* contactId: Number(aliceMain.id),
* autoRenewEnabled: true,
* extendedAttributes: {
* bio_agree: "I Agree",
* },
* });
* ```
*
* ## Slow domain registrations
*
* Some TLDs have registration processes that can take hours or days to complete. When this happens, the provider will save the domain in a partial state and display the following message:
*
* > domain registration is not complete, current state: registering. You can try to run terraform again to try and converge the domain registration
*
* This is expected behavior. You can re-run `pulumi up` to check if the registration has completed. The provider will automatically attempt to converge the domain registration on each apply until the registration is complete.
*
* ## Import
*
* DNSimple registered domains can be imported using their domain name and **optionally** with domain registration ID.
*
* **Importing registered domain example.com:**
*
* ```sh
* $ pulumi import dnsimple:index/registeredDomain:RegisteredDomain example example.com
* ```
*
* **Importing registered domain example.com with domain registration ID 1234:**
*
* ```sh
* $ pulumi import dnsimple:index/registeredDomain:RegisteredDomain example example.com_1234
* ```
*
* > **Note:** At present there is no way to retrieve the domain registration ID from the DNSimple API or UI. You will need to have noted the ID when you created the domain registration. Prefer using the domain name only when importing.
*/
export declare class RegisteredDomain extends pulumi.CustomResource {
/**
* Get an existing RegisteredDomain 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?: RegisteredDomainState, opts?: pulumi.CustomResourceOptions): RegisteredDomain;
/**
* Returns true if the given object is an instance of RegisteredDomain. 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 RegisteredDomain;
readonly accountId: pulumi.Output<number>;
/**
* Whether the domain should be set to auto-renew (default: `false`).
*/
readonly autoRenewEnabled: pulumi.Output<boolean>;
/**
* The ID of the contact to be used for the domain registration. The contact ID can be changed after the domain has been registered. The change will result in a new registrant change, which may result in a [60-day lock](https://support.dnsimple.com/articles/icann-60-day-lock-registrant-change/).
*/
readonly contactId: pulumi.Output<number>;
/**
* Whether the domain should have DNSSEC enabled (default: `false`).
*/
readonly dnssecEnabled: pulumi.Output<boolean>;
/**
* The domain registration details. (see below for nested schema)
*/
readonly domainRegistration: pulumi.Output<outputs.RegisteredDomainDomainRegistration>;
readonly expiresAt: pulumi.Output<string>;
/**
* A map of extended attributes to be set for the domain registration. To see if there are any required extended attributes for any TLD use our [Lists the TLD Extended Attributes API](https://developer.dnsimple.com/v2/tlds/#getTldExtendedAttributes). The values provided in the `extendedAttributes` will also be sent when a registrant change is initiated as part of changing the `contactId`.
*/
readonly extendedAttributes: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The domain name to be registered.
*/
readonly name: pulumi.Output<string>;
/**
* The premium price for the domain registration. This is only required if the domain is a premium domain. You can use our [Check domain API](https://developer.dnsimple.com/v2/registrar/#checkDomain) to check if a domain is premium and [Retrieve domain prices API](https://developer.dnsimple.com/v2/registrar/#getDomainPrices) to retrieve the premium price for a domain.
*/
readonly premiumPrice: pulumi.Output<string | undefined>;
/**
* The registrant change details.
*/
readonly registrantChange: pulumi.Output<outputs.RegisteredDomainRegistrantChange>;
/**
* (String) - The state of the domain registration.
*/
readonly state: pulumi.Output<string>;
/**
* (see below for nested schema).
*/
readonly timeouts: pulumi.Output<outputs.RegisteredDomainTimeouts | undefined>;
/**
* Whether the domain transfer lock protection is enabled (default: `true`).
*/
readonly transferLockEnabled: pulumi.Output<boolean>;
/**
* Whether a [trustee](https://support.dnsimple.com/articles/what-is-domain-trustee/) should be enabled for the domain. An extra cost may apply (default: `false`).
*/
readonly trustee: pulumi.Output<boolean>;
/**
* The domain name in Unicode format.
*/
readonly unicodeName: pulumi.Output<string>;
/**
* Whether the domain should have WHOIS privacy enabled (default: `false`).
*/
readonly whoisPrivacyEnabled: pulumi.Output<boolean>;
/**
* Create a RegisteredDomain 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: RegisteredDomainArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RegisteredDomain resources.
*/
export interface RegisteredDomainState {
accountId?: pulumi.Input<number | undefined>;
/**
* Whether the domain should be set to auto-renew (default: `false`).
*/
autoRenewEnabled?: pulumi.Input<boolean | undefined>;
/**
* The ID of the contact to be used for the domain registration. The contact ID can be changed after the domain has been registered. The change will result in a new registrant change, which may result in a [60-day lock](https://support.dnsimple.com/articles/icann-60-day-lock-registrant-change/).
*/
contactId?: pulumi.Input<number | undefined>;
/**
* Whether the domain should have DNSSEC enabled (default: `false`).
*/
dnssecEnabled?: pulumi.Input<boolean | undefined>;
/**
* The domain registration details. (see below for nested schema)
*/
domainRegistration?: pulumi.Input<inputs.RegisteredDomainDomainRegistration | undefined>;
expiresAt?: pulumi.Input<string | undefined>;
/**
* A map of extended attributes to be set for the domain registration. To see if there are any required extended attributes for any TLD use our [Lists the TLD Extended Attributes API](https://developer.dnsimple.com/v2/tlds/#getTldExtendedAttributes). The values provided in the `extendedAttributes` will also be sent when a registrant change is initiated as part of changing the `contactId`.
*/
extendedAttributes?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The domain name to be registered.
*/
name?: pulumi.Input<string | undefined>;
/**
* The premium price for the domain registration. This is only required if the domain is a premium domain. You can use our [Check domain API](https://developer.dnsimple.com/v2/registrar/#checkDomain) to check if a domain is premium and [Retrieve domain prices API](https://developer.dnsimple.com/v2/registrar/#getDomainPrices) to retrieve the premium price for a domain.
*/
premiumPrice?: pulumi.Input<string | undefined>;
/**
* The registrant change details.
*/
registrantChange?: pulumi.Input<inputs.RegisteredDomainRegistrantChange | undefined>;
/**
* (String) - The state of the domain registration.
*/
state?: pulumi.Input<string | undefined>;
/**
* (see below for nested schema).
*/
timeouts?: pulumi.Input<inputs.RegisteredDomainTimeouts | undefined>;
/**
* Whether the domain transfer lock protection is enabled (default: `true`).
*/
transferLockEnabled?: pulumi.Input<boolean | undefined>;
/**
* Whether a [trustee](https://support.dnsimple.com/articles/what-is-domain-trustee/) should be enabled for the domain. An extra cost may apply (default: `false`).
*/
trustee?: pulumi.Input<boolean | undefined>;
/**
* The domain name in Unicode format.
*/
unicodeName?: pulumi.Input<string | undefined>;
/**
* Whether the domain should have WHOIS privacy enabled (default: `false`).
*/
whoisPrivacyEnabled?: pulumi.Input<boolean | undefined>;
}
/**
* The set of arguments for constructing a RegisteredDomain resource.
*/
export interface RegisteredDomainArgs {
/**
* Whether the domain should be set to auto-renew (default: `false`).
*/
autoRenewEnabled?: pulumi.Input<boolean | undefined>;
/**
* The ID of the contact to be used for the domain registration. The contact ID can be changed after the domain has been registered. The change will result in a new registrant change, which may result in a [60-day lock](https://support.dnsimple.com/articles/icann-60-day-lock-registrant-change/).
*/
contactId: pulumi.Input<number>;
/**
* Whether the domain should have DNSSEC enabled (default: `false`).
*/
dnssecEnabled?: pulumi.Input<boolean | undefined>;
/**
* A map of extended attributes to be set for the domain registration. To see if there are any required extended attributes for any TLD use our [Lists the TLD Extended Attributes API](https://developer.dnsimple.com/v2/tlds/#getTldExtendedAttributes). The values provided in the `extendedAttributes` will also be sent when a registrant change is initiated as part of changing the `contactId`.
*/
extendedAttributes?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The domain name to be registered.
*/
name: pulumi.Input<string>;
/**
* The premium price for the domain registration. This is only required if the domain is a premium domain. You can use our [Check domain API](https://developer.dnsimple.com/v2/registrar/#checkDomain) to check if a domain is premium and [Retrieve domain prices API](https://developer.dnsimple.com/v2/registrar/#getDomainPrices) to retrieve the premium price for a domain.
*/
premiumPrice?: pulumi.Input<string | undefined>;
/**
* (see below for nested schema).
*/
timeouts?: pulumi.Input<inputs.RegisteredDomainTimeouts | undefined>;
/**
* Whether the domain transfer lock protection is enabled (default: `true`).
*/
transferLockEnabled?: pulumi.Input<boolean | undefined>;
/**
* Whether a [trustee](https://support.dnsimple.com/articles/what-is-domain-trustee/) should be enabled for the domain. An extra cost may apply (default: `false`).
*/
trustee?: pulumi.Input<boolean | undefined>;
/**
* Whether the domain should have WHOIS privacy enabled (default: `false`).
*/
whoisPrivacyEnabled?: pulumi.Input<boolean | undefined>;
}
//# sourceMappingURL=registeredDomain.d.ts.map