Resource: aws_route53domains_registered_domain

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 aws_route53domains_registered_domain 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. terraform destroy does not delete the domain but does remove the resource from Terraform state.

Example Usage

resource "aws_route53domains_registered_domain" "example" {
  domain_name = "example.com"

  name_server {
    name = "ns-195.awsdns-24.com"
  }

  name_server {
    name = "ns-874.awsdns-45.net"
  }

  tags = {
    Environment = "test"
  }
}

Argument Reference

This argument supports the following arguments:

Contact Blocks

The admin_contact, billing_contact, registrant_contact and tech_contact blocks support the following:

name_server Blocks

The name_server blocks supports the following:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import domains using the domain_name. For example:

import {
  to = aws_route53domains_registered_domain.example
  id = "example.com"
}

Using terraform import, import domains using the domain name. For example:

% terraform import aws_route53domains_registered_domain.example example.com