FEATURES PRICING ABOUT DOCS LOGIN

dme_record

Provides a DNSMadeEasy record resource.

Example Usage

# Add an A record to the domain
resource "dme_record" "www" {
  domainid = "123456"
  name = "www"
  type = "A"
  value = "192.168.1.1"
  ttl = 3600
  gtdLocation = "DEFAULT"
}

Argument Reference

The following arguments are supported:

Additional arguments are listed below under DNS Record Types.

DNS Record Types

The type of record being created affects the interpretation of the value argument; also, some additional arguments are required for some record types. http://help.dnsmadeeasy.com/tutorials/managed-dns/ has more information.

A Record

CNAME Record

ANAME Record

MX Record

HTTPRED Record

TXT Record

SPF Record

PTR Record

NS Record

AAAA Record

SRV Record

Attributes Reference

The following attributes are exported:

Additional fields may also be exported by some record types - see DNS Record Types.

Record Type Examples

Following are examples of using each of the record types.

# Provide your API and Secret Keys, and whether the sandbox
# is being used (defaults to false)
provider "dme" {
  akey = "aaaaaa1a-11a1-1aa1-a101-11a1a11aa1aa"
  skey = "11a0a11a-a1a1-111a-a11a-a11110a11111"
  usesandbox = true
}

# A Record
resource "dme_record" "testa" {
  domainid = "123456"
  name = "testa"
  type = "A"
  value = "1.1.1.1"
  ttl = 1000
  gtdLocation = "DEFAULT"
}

# CNAME record
resource "dme_record" "testcname" {
  domainid = "123456"
  name = "testcname"
  type = "CNAME"
  value = "foo"
  ttl = 1000
}

# ANAME record
resource "dme_record" "testaname" {
  domainid = "123456"
  name = "testaname"
  type = "ANAME"
  value = "foo"
  ttl = 1000
}

# MX record
resource "dme_record" "testmx" {
  domainid = "123456"
  name = "testmx"
  type = "MX"
  value = "foo"
  mxLevel = 10
  ttl = 1000
}

# HTTPRED
resource "dme_record" "testhttpred" {
  domainid = "123456"
  name = "testhttpred"
  type = "HTTPRED"
  value = "https://github.com/soniah/terraform-provider-dme"
  hardLink = true
  redirectType = "Hidden Frame Masked"
  title = "An Example"
  keywords = "terraform example"
  description = "This is a description"
  ttl = 2000
}

# TXT record
resource "dme_record" "testtxt" {
  domainid = "123456"
  name = "testtxt"
  type = "TXT"
  value = "foo"
  ttl = 1000
}

# SPF record
resource "dme_record" "testspf" {
  domainid = "123456"
  name = "testspf"
  type = "SPF"
  value = "foo"
  ttl = 1000
}

# PTR record
resource "dme_record" "testptr" {
  domainid = "123456"
  name = "testptr"
  type = "PTR"
  value = "foo"
  ttl = 1000
}

# NS record
resource "dme_record" "testns" {
  domainid = "123456"
  name = "testns"
  type = "NS"
  value = "foo"
  ttl = 1000
}

# AAAA record
resource "dme_record" "testaaaa" {
  domainid = "123456"
  name = "testaaaa"
  type = "AAAA"
  value = "FE80::0202:B3FF:FE1E:8329"
  ttl = 1000
}

# SRV record
resource "dme_record" "testsrv" {
  domainid = "123456"
  name = "testsrv"
  type = "SRV"
  value = "foo"
  priority = 10
  weight = 20
  port = 30
  ttl = 1000
}

See the source of this document at Terraform.io

REQUEST A DEMO