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