Skip to content

Resource: awsRoute53DomainsRegisteredDomain

Provides a resource to manage a domain that has been registered and associated with the current AWS account.

This is an advanced resource and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.

The awsRoute53DomainsRegisteredDomain resource behaves differently from normal resources in that if a domain has been registered, Terraform does not register this domain, but instead "adopts" it into management. terraformDestroy does not delete the domain but does remove the resource from Terraform state.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.route53DomainsRegisteredDomain.Route53DomainsRegisteredDomain(
  this,
  "example",
  {
    domainName: "example.com",
    nameServer: [
      {
        name: "ns-195.awsdns-24.com",
      },
      {
        name: "ns-874.awsdns-45.net",
      },
    ],
    tags: {
      Environment: "test",
    },
  }
);

Argument Reference

\~> NOTE: You must specify the same privacy setting for adminPrivacy, registrantPrivacy and techPrivacy.

The following arguments are supported:

  • adminContact - (Optional) Details about the domain administrative contact.
  • adminPrivacy - (Optional) Whether domain administrative contact information is concealed from WHOIS queries. Default: true.
  • autoRenew - (Optional) Whether the domain registration is set to renew automatically. Default: true.
  • domainName - (Required) The name of the registered domain.
  • nameServer - (Optional) The list of nameservers for the domain.
  • registrantContact - (Optional) Details about the domain registrant.
  • registrantPrivacy - (Optional) Whether domain registrant contact information is concealed from WHOIS queries. Default: true.
  • tags - (Optional) A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  • techContact - (Optional) Details about the domain technical contact.
  • techPrivacy - (Optional) Whether domain technical contact information is concealed from WHOIS queries. Default: true.
  • transferLock - (Optional) Whether the domain is locked for transfer. Default: true.

The adminContact, registrantContact and techContact objects support the following:

  • addressLine1 - (Optional) First line of the contact's address.
  • addressLine2 - (Optional) Second line of contact's address, if any.
  • city - (Optional) The city of the contact's address.
  • contactType - (Optional) Indicates whether the contact is a person, company, association, or public organization. See the AWS API documentation for valid values.
  • countryCode - (Optional) Code for the country of the contact's address. See the AWS API documentation for valid values.
  • email - (Optional) Email address of the contact.
  • extraParams - (Optional) A key-value map of parameters required by certain top-level domains.
  • fax - (Optional) Fax number of the contact. Phone number must be specified in the format "+[country dialing code].[number including any area code]".
  • firstName - (Optional) First name of contact.
  • lastName - (Optional) Last name of contact.
  • organizationName - (Optional) Name of the organization for contact types other than person.
  • phoneNumber - (Optional) The phone number of the contact. Phone number must be specified in the format "+[country dialing code].[number including any area code]".
  • state - (Optional) The state or province of the contact's city.
  • zipCode - (Optional) The zip or postal code of the contact's address.

The nameServer object supports the following:

  • glueIps - (Optional) Glue IP addresses of a name server. The list can contain only one IPv4 and one IPv6 address.
  • name - (Required) The fully qualified host name of the name server.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The domain name.
  • abuseContactEmail - Email address to contact to report incorrect contact information for a domain, to report that the domain is being used to send spam, to report that someone is cybersquatting on a domain name, or report some other type of abuse.
  • abuseContactPhone - Phone number for reporting abuse.
  • creationDate - The date when the domain was created as found in the response to a WHOIS query.
  • expirationDate - The date when the registration for the domain is set to expire.
  • registrarName - Name of the registrar of the domain as identified in the registry.
  • registrarUrl - Web address of the registrar.
  • reseller - Reseller of the domain.
  • statusList - List of domain name status codes.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
  • updatedDate - The last updated date of the domain as found in the response to a WHOIS query.
  • whoisServer - The fully qualified name of the WHOIS server that can answer the WHOIS query for the domain.

Timeouts

Configuration options:

  • create - (Default 30M)
  • update - (Default 30M)