github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/website/source/docs/providers/dme/r/record.html.markdown (about)

     1  ---
     2  layout: "dme"
     3  page_title: "DNSMadeEasy: dme_record"
     4  sidebar_current: "docs-dme-resource-record"
     5  description: |-
     6    Provides a DNSMadeEasy record resource.
     7  ---
     8  
     9  # dme\_record
    10  
    11  Provides a DNSMadeEasy record resource.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  # Add an A record to the domain
    17  resource "dme_record" "www" {
    18    domainid = "123456"
    19    name = "www"
    20    type = "A"
    21    value = "192.168.1.1"
    22    ttl = 3600
    23  }
    24  ```
    25  
    26  ## Argument Reference
    27  
    28  The following arguments are supported:
    29  
    30  * `domainid` - (String, Required) The domain id to add the
    31    record to
    32  * `name` - (Required) The name of the record
    33  * `type` - (Required) The type of the record
    34  * `value` - (Required) The value of the record; its usage
    35    will depend on the `type` (see below)
    36  * `ttl` - (Integer, Optional) The TTL of the record
    37  
    38  Additional arguments are listed below under DNS Record Types.
    39  
    40  ## DNS Record Types
    41  
    42  The type of record being created affects the interpretation of
    43  the `value` argument; also, some additional arguments are
    44  required for some record types.
    45  http://help.dnsmadeeasy.com/tutorials/managed-dns/ has more
    46  information.
    47  
    48  #### A Record
    49  
    50  * `value` is the hostname
    51  
    52  #### CNAME Record
    53  
    54  * `value` is the alias name
    55  
    56  #### ANAME Record
    57  
    58  * `value` is the aname target
    59  
    60  #### MX Record
    61  
    62  * `value` is the server
    63  * `mxLevel` (Integer, Required) is the MX level
    64  
    65  ####  HTTPRED Record
    66  
    67  * `value` is the URL
    68  * `hardLink` (Boolean, Optional) If true, any request that is
    69    made for this record will have the path removed after the
    70    fully qualified domain name portion of the requested URL
    71  * `redirectType` (Required) One of 'Hidden Frame Masked',
    72    'Standard 301', or 'Standard 302'
    73  * `title` (Optional) If set, the hidden iframe that is
    74    used in conjunction with the Hidden Frame Masked Redirect
    75    Type will have the HTML meta description data field set to
    76    the value of this field
    77  * `keywords` (Optional) If set, the hidden iframe that is used
    78    in conjunction with the Hidden Frame Masked Redirect Type
    79    will have the HTML meta keywords data field set to the value
    80    of this field
    81  * `description` (Optional) A human-readable description.
    82  
    83  #### TXT Record
    84  
    85  * `value` is free form text
    86  
    87  #### SPF Record
    88  
    89  * `value` is the SPF definition of hosts allowed to send email
    90  
    91  ####  PTR Record
    92  
    93  * `value` is the reverse DNS for the host
    94  
    95  #### NS Record
    96  
    97  * `value` is the host name of the server
    98  
    99  #### AAAA Record
   100  
   101  * `value` is the IPv6 address
   102  
   103  #### SRV Record
   104  
   105  * `value` is the host
   106  * `priority` (Integer, Required). Acts the same way as MX Level
   107  * `weight` (Integer, Required). Hits will be assigned proportionately
   108    by weight
   109  * `port` (Integer, Required). The actual port of the service offered
   110  
   111  ## Attributes Reference
   112  
   113  The following attributes are exported:
   114  
   115  * `name` - The name of the record
   116  * `type` - The type of the record
   117  * `value` - The value of the record
   118    `type` (see below)
   119  * `ttl` - The TTL of the record
   120  
   121  Additional fields may also be exported by some record types -
   122  see DNS Record Types.
   123  
   124  #### Record Type Examples
   125  
   126  Following are examples of using each of the record types.
   127  
   128  ```
   129  # Provide your API and Secret Keys, and whether the sandbox
   130  # is being used (defaults to false)
   131  provider "dme" {
   132    akey = "aaaaaa1a-11a1-1aa1-a101-11a1a11aa1aa"
   133    skey = "11a0a11a-a1a1-111a-a11a-a11110a11111"
   134    usesandbox = true
   135  }
   136  
   137  # A Record
   138  resource "dme_record" "testa" {
   139    domainid = "123456"
   140    name = "testa"
   141    type = "A"
   142    value = "1.1.1.1"
   143    ttl = 1000
   144  }
   145  
   146  # CNAME record
   147  resource "dme_record" "testcname" {
   148    domainid = "123456"
   149    name = "testcname"
   150    type = "CNAME"
   151    value = "foo"
   152    ttl = 1000
   153  }
   154  
   155  # ANAME record
   156  resource "dme_record" "testaname" {
   157    domainid = "123456"
   158    name = "testaname"
   159    type = "ANAME"
   160    value = "foo"
   161    ttl = 1000
   162  }
   163  
   164  # MX record
   165  resource "dme_record" "testmx" {
   166    domainid = "123456"
   167    name = "testmx"
   168    type = "MX"
   169    value = "foo"
   170    mxLevel = 10
   171    ttl = 1000
   172  }
   173  
   174  # HTTPRED
   175  resource "dme_record" "testhttpred" {
   176    domainid = "123456"
   177    name = "testhttpred"
   178    type = "HTTPRED"
   179    value = "https://github.com/soniah/terraform-provider-dme"
   180    hardLink = true
   181    redirectType = "Hidden Frame Masked"
   182    title = "An Example"
   183    keywords = "terraform example"
   184    description = "This is a description"
   185    ttl = 2000
   186  }
   187  
   188  # TXT record
   189  resource "dme_record" "testtxt" {
   190    domainid = "123456"
   191    name = "testtxt"
   192    type = "TXT"
   193    value = "foo"
   194    ttl = 1000
   195  }
   196  
   197  # SPF record
   198  resource "dme_record" "testspf" {
   199    domainid = "123456"
   200    name = "testspf"
   201    type = "SPF"
   202    value = "foo"
   203    ttl = 1000
   204  }
   205  
   206  # PTR record
   207  resource "dme_record" "testptr" {
   208    domainid = "123456"
   209    name = "testptr"
   210    type = "PTR"
   211    value = "foo"
   212    ttl = 1000
   213  }
   214  
   215  # NS record
   216  resource "dme_record" "testns" {
   217    domainid = "123456"
   218    name = "testns"
   219    type = "NS"
   220    value = "foo"
   221    ttl = 1000
   222  }
   223  
   224  # AAAA record
   225  resource "dme_record" "testaaaa" {
   226    domainid = "123456"
   227    name = "testaaaa"
   228    type = "AAAA"
   229    value = "FE80::0202:B3FF:FE1E:8329"
   230    ttl = 1000
   231  }
   232  
   233  # SRV record
   234  resource "dme_record" "testsrv" {
   235    domainid = "123456"
   236    name = "testsrv"
   237    type = "SRV"
   238    value = "foo"
   239    priority = 10
   240    weight = 20
   241    port = 30
   242    ttl = 1000
   243  }
   244  ```